aboutsummaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2013-02-04 22:33:27 -0600
committerRob Landley <rob@landley.net>2013-02-04 22:33:27 -0600
commitd1fcf4faf98374d4e24ca2c71e703589d348ee35 (patch)
treec141c3e8ebd3519e0ff1fc7491edc038c190eec2 /scripts
parent44b9d043ccbe9a6e4bd2dbabe64a0854dbe5a7ac (diff)
downloadtoybox-d1fcf4faf98374d4e24ca2c71e703589d348ee35.tar.gz
Tweak cmp test to be a little more deterministic.
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/test/cmp.test3
1 files changed, 2 insertions, 1 deletions
diff --git a/scripts/test/cmp.test b/scripts/test/cmp.test
index df087cce..ef53b37d 100755
--- a/scripts/test/cmp.test
+++ b/scripts/test/cmp.test
@@ -18,6 +18,7 @@ testing "cmp identical files, return code" "cmp input input2 && echo yes" "yes\n
testing "cmp EOF, stderr" "cmp input input2 2>&1" "cmp: EOF on input2\n" "ab\nc\nx" ""
testing "cmp EOF, return code" "cmp input input2 2>/dev/null || echo yes" "yes\n" "ab\nc\nx" ""
+# The gnu/dammit version fails this because posix says "char" and they don't.
testing "cmp diff, stdout" "cmp input input2" "input input2 differ: char 4, line 2\n" "ab\nx\nx" ""
testing "cmp diff, return code" "cmp input input2 > /dev/null || echo yes" "yes\n" "ab\nx\nx" ""
@@ -25,7 +26,7 @@ testing "cmp -s EOF, return code" "cmp -s input input2 || echo yes" "yes\n" "ab
testing "cmp -s diff, return code" "cmp -s input input2 || echo yes" "yes\n" "ab\nx\nx" ""
testing "cmp -l EOF, stderr" "cmp -l input input2 2>&1" "cmp: EOF on input2\n" "ab\nc\nx" ""
-testing "cmp -l diff and EOF, stdout and stderr" "cmp -l input input2 2>&1" "cmp: EOF on input2\n4 170 143\n" "ab\nx\nx" ""
+testing "cmp -l diff and EOF, stdout and stderr" "cmp -l input input2 2>&1 | sort" "4 170 143\ncmp: EOF on input2\n" "ab\nx\nx" ""
rm input2