summaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorDenis Vlasenko2008-02-13 14:30:33 +0000
committerDenis Vlasenko2008-02-13 14:30:33 +0000
commit3b92eaac53e1557ea923d6a395f753224a73d676 (patch)
tree8d347a473b8be1b9fb8d27954cb39e7d50b2ae25 /testsuite
parent75cddd8eb514082c8f9945ae1976f97c4b0413b4 (diff)
downloadbusybox-3b92eaac53e1557ea923d6a395f753224a73d676.zip
busybox-3b92eaac53e1557ea923d6a395f753224a73d676.tar.gz
sort: -z outputs NUL terminated lines. Closes bug 1591.
Diffstat (limited to 'testsuite')
-rw-r--r--testsuite/README3
-rwxr-xr-xtestsuite/runtest3
-rwxr-xr-xtestsuite/sort.tests6
3 files changed, 9 insertions, 3 deletions
diff --git a/testsuite/README b/testsuite/README
index a44846d..b4719e6 100644
--- a/testsuite/README
+++ b/testsuite/README
@@ -1,6 +1,3 @@
-Update: doesn't work as described. Try "make check" from parent dir...
-* * *
-
To run the test suite, change to this directory and run "./runtest". It will
run all of the test cases, and list those with unexpected outcomes. Adding the
-v option will cause it to show expected outcomes as well. To only run the test
diff --git a/testsuite/runtest b/testsuite/runtest
index 93d5ed6..fc8392a 100755
--- a/testsuite/runtest
+++ b/testsuite/runtest
@@ -1,5 +1,8 @@
#!/bin/sh
+# Usage:
+# runtest [applet1] [applet2...]
+
# Run one old-style test.
# Tests are stored in applet/testcase shell scripts.
# They are run using "sh -x -e applet/testcase".
diff --git a/testsuite/sort.tests b/testsuite/sort.tests
index 1db7870..f700dc0 100755
--- a/testsuite/sort.tests
+++ b/testsuite/sort.tests
@@ -107,6 +107,12 @@ a c
b c
" ""
+testing "sort -z outputs NUL terminated lines" "sort -z input" "\
+one\0three\0two\0\
+" "\
+one\0two\0three\0\
+" ""
+
testing "sort key doesn't strip leading blanks, disables fallback global sort" \
"sort -n -k2 -t ' '" " a \n 1 \n 2 \n" "" " 2 \n 1 \n a \n"