diff options
author | Jim Meyering <meyering@redhat.com> | 2010-04-17 08:21:32 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-04-17 08:29:36 +0200 |
commit | 59669066e7771fa01912e4c2081ad80aa78d3f68 (patch) | |
tree | b8a13e44fd55785eba584ac4f353187357c0fe06 | |
parent | 4ba438168d7508853e4be9f74ad6d95ac024a20a (diff) | |
download | diffutils-59669066e7771fa01912e4c2081ad80aa78d3f68.tar.gz |
tests: use original no-newline-at-eof test, but with -U1, not -U2
* tests/no-newline-at-eof: Revert to the smaller test, but with
-U1 rather than -U2, since that actually triggers the bug.
-rw-r--r-- | tests/no-newline-at-eof | 20 |
1 files changed, 8 insertions, 12 deletions
diff --git a/tests/no-newline-at-eof b/tests/no-newline-at-eof index 092d1cd..e5dc89d 100644 --- a/tests/no-newline-at-eof +++ b/tests/no-newline-at-eof @@ -6,28 +6,24 @@ : ${srcdir=.} . "$srcdir/init.sh"; path_prepend_ ../src -printf '\n1\n2\n3' > a || framework_failure_ -printf '\n0\n\n1\n2\n3' > b || framework_failure_ +printf '\n1' > a || framework_failure_ +printf '\n0\n\n1' > b || framework_failure_ cat <<EOF > exp || framework_failure_ -@@ -1,4 +1,6 @@ +@@ -1,2 +1,4 @@ +0 + 1 - 2 - 3 \ No newline at end of file EOF cat <<EOF > exp2 || framework_failure_ -@@ -1,4 +1,6 @@ +@@ -1,2 +1,4 @@ +-1 +0 + - 1 - 2 --3 -+3 ++1 \ No newline at end of file EOF @@ -36,7 +32,7 @@ fail=0 # So we don't have to record trailing blanks in expected output above. opt=--suppress-blank-empty -diff $opt -u a b > out 2> err +diff $opt -U1 a b > out 2> err test $? = 1 || fail=1 sed -n '/^@@/,$p' out > k && mv k out || fail=1 @@ -47,7 +43,7 @@ compare err /dev/null || fail=1 # Repeat, but with a newline at the end of "a". echo >> a -diff $opt -U2 a b > out 2> err +diff $opt -U1 a b > out 2> err test $? = 1 || fail=1 sed -n '/^@@/,$p' out > k && mv k out || fail=1 |