summary refs log tree commit diff
path: root/Test/B03print.ztst
diff options
context:
space:
mode:
Diffstat (limited to 'Test/B03print.ztst')
-rw-r--r--Test/B03print.ztst17
1 files changed, 17 insertions, 0 deletions
diff --git a/Test/B03print.ztst b/Test/B03print.ztst
index e36e55caa..c3ba42b18 100644
--- a/Test/B03print.ztst
+++ b/Test/B03print.ztst
@@ -263,3 +263,20 @@
  printf '%b\n' '\0123'
 0:printf handles \0... octal escapes in replacement text
 >S
+
+ print -lO $'a' $'a\0' $'a\0b' $'a\0b\0' $'a\0b\0a' $'a\0b\0b' $'a\0c' |
+ while read -r line; do
+    for (( i = 1; i <= ${#line}; i++ )); do
+      foo=$line[i]
+      printf "%02x" $(( #foo ))
+    done
+    print
+ done
+0:sorting with embedded nulls
+>610063
+>6100620062
+>6100620061
+>61006200
+>610062
+>6100
+>61