summaryrefslogtreecommitdiff
path: root/tests/misc/shuf
diff options
context:
space:
mode:
Diffstat (limited to 'tests/misc/shuf')
-rwxr-xr-xtests/misc/shuf5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/misc/shuf b/tests/misc/shuf
index 97109498f..83530c207 100755
--- a/tests/misc/shuf
+++ b/tests/misc/shuf
@@ -51,4 +51,9 @@ test "$t" = 'a b c d e' || { fail=1; echo "not a permutation" 1>&2; }
# "seq 1860" produces 8193 (8K + 1) bytes of output.
seq 1860 | shuf > /dev/null || fail=1
+# coreutils-6.12 and earlier would output a newline terminator, not \0.
+shuf --zero-terminated -i 1-1 > out || fail=1
+printf '1\0' > exp || framework_failure
+cmp out exp || { fail=1; echo "missing NUL terminator?" 1>&2; }
+
(exit $fail); exit $fail