diff options
author | Rob Landley <rob@landley.net> | 2016-03-02 15:20:04 -0600 |
---|---|---|
committer | Rob Landley <rob@landley.net> | 2016-03-02 15:20:04 -0600 |
commit | 336c44adca1768ada1e1e2f4d7dbbc33e994e582 (patch) | |
tree | 9780ee9602ffbca6b04e472d3ac0d158f92ac49c /tests/cmp.test | |
parent | eb830728b12152702c3852d079ad5c8a7f6e709b (diff) | |
download | toybox-336c44adca1768ada1e1e2f4d7dbbc33e994e582.tar.gz |
Factor out command name at the start of test name, have runtest.sh print it.
Diffstat (limited to 'tests/cmp.test')
-rwxr-xr-x | tests/cmp.test | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/tests/cmp.test b/tests/cmp.test index ef53b37d..c3e8f5be 100755 --- a/tests/cmp.test +++ b/tests/cmp.test @@ -2,34 +2,34 @@ [ -f testing.sh ] && . testing.sh -testing "cmp not enough arguments [fail]" "cmp input 2>/dev/null || echo yes" "yes\n" "foo" "" -testing "cmp missing file1 [fail]" "cmp file1 input 2>/dev/null || echo yes" "yes\n" "foo" "" +testing "not enough arguments [fail]" "cmp input 2>/dev/null || echo yes" "yes\n" "foo" "" +testing "missing file1 [fail]" "cmp file1 input 2>/dev/null || echo yes" "yes\n" "foo" "" #mkdir dir -#testing "cmp directory [fail]" "cmp dir dir 2>/dev/null || echo yes" \ +#testing "directory [fail]" "cmp dir dir 2>/dev/null || echo yes" \ #"yes\n" "" "" #rmdir dir echo "ab c" > input2 -testing "cmp identical files, stdout" "cmp input input2" "" "ab\nc\n" "" -testing "cmp identical files, return code" "cmp input input2 && echo yes" "yes\n" "ab\nc\n" "" +testing "identical files, stdout" "cmp input input2" "" "ab\nc\n" "" +testing "identical files, return code" "cmp input input2 && echo yes" "yes\n" "ab\nc\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" "" +testing "EOF, stderr" "cmp input input2 2>&1" "cmp: EOF on input2\n" "ab\nc\nx" "" +testing "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" "" +testing "diff, stdout" "cmp input input2" "input input2 differ: char 4, line 2\n" "ab\nx\nx" "" +testing "diff, return code" "cmp input input2 > /dev/null || echo yes" "yes\n" "ab\nx\nx" "" -testing "cmp -s EOF, return code" "cmp -s input input2 || echo yes" "yes\n" "ab\nc\nx" "" -testing "cmp -s diff, return code" "cmp -s input input2 || echo yes" "yes\n" "ab\nx\nx" "" +testing "-s EOF, return code" "cmp -s input input2 || echo yes" "yes\n" "ab\nc\nx" "" +testing "-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 | sort" "4 170 143\ncmp: EOF on input2\n" "ab\nx\nx" "" +testing "-l EOF, stderr" "cmp -l input input2 2>&1" "cmp: EOF on input2\n" "ab\nc\nx" "" +testing "-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 -testing "cmp stdin and file" "cmp input -" "input - differ: char 4, line 2\n" "ab\nc\n" "ab\nx\n" -#testing "cmp stdin and stdin" "cmp input -" "" "" "ab\nc\n" +testing "stdin and file" "cmp input -" "input - differ: char 4, line 2\n" "ab\nc\n" "ab\nx\n" +#testing "stdin and stdin" "cmp input -" "" "" "ab\nc\n" |