diff options
author | Denys Vlasenko | 2010-01-18 01:04:20 +0100 |
---|---|---|
committer | Denys Vlasenko | 2010-01-18 01:04:20 +0100 |
commit | b972f949577301bd7a66e88c11b9e26431d80a11 (patch) | |
tree | 753f4fffca651075a72774495700b882cf56c42d /testsuite/diff.tests | |
parent | 33f9dc08e55b8938452fce20e7c5e4138255edc9 (diff) | |
download | busybox-b972f949577301bd7a66e88c11b9e26431d80a11.zip busybox-b972f949577301bd7a66e88c11b9e26431d80a11.tar.gz |
diff: add more tests
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite/diff.tests')
-rwxr-xr-x | testsuite/diff.tests | 30 |
1 files changed, 29 insertions, 1 deletions
diff --git a/testsuite/diff.tests b/testsuite/diff.tests index bf24b77..06bf163 100755 --- a/testsuite/diff.tests +++ b/testsuite/diff.tests @@ -39,11 +39,39 @@ testing "diff of stdin, no newline in the file" \ # we also test that stdin is in fact NOT read testing "diff of stdin, twice" \ - "diff - -; echo $?; wc -c" \ + 'diff - -; echo $?; wc -c' \ "0\n5\n" \ "" \ "stdin" +test x"$SKIP_KNOWN_BUGS" = x"" && \ +testing "diff -b treats EOF as whitespace" \ + 'diff -ub - input; echo $?' \ + "0\n" \ + "abc" \ + "abc " + +test x"$SKIP_KNOWN_BUGS" = x"" && \ +testing "diff -b treats all spaces as equal" \ + 'diff -ub - input; echo $?' \ + "0\n" \ + "a \t c\n" \ + "a\t \tc\n" + +test x"$SKIP_KNOWN_BUGS" = x"" && \ +testing "diff always takes context from old file" \ + "diff -ub - input | $TRIM_TAB" \ +"\ +--- - ++++ input +@@ -1 +1,3 @@ ++abc + a c ++def +" \ + "abc\na c\ndef\n" \ + "a c\n" + # testing "test name" "options" "expected result" "file input" "stdin" rm -rf diff1 diff2 |