doc: rewrite the "Unusual File Names" section
[diffutils.git] / tests / ignore-matching-lines
blob1b3259f64e2ba89a073e400786be796f697f6ef4
1 #!/bin/sh
2 # --ignore-matching-lines
4 # Bug reported by Vincent Lefevre in <http://bugs.gnu.org/16864>.
6 . "${srcdir=.}/init.sh"; path_prepend_ ../src
8 fail=0
10 cat <<'EOF' >a
17 EOF
19 cat <<'EOF' >b
27 EOF
29 cat <<'EOF' >exp
30 @@ -1,6 +1,7 @@
31 -1a
32 +1b
34 -3a
35 +3b
40 EOF
42 returns_ 1 diff -u --ignore-matching-lines 3 a b >out 2>err || fail=1
43 sed 1,2d out >outtail || framework_failure+
44 compare exp outtail || fail=1
46 Exit $fail