mirror of
https://https.git.savannah.gnu.org/git/diffutils.git
synced 2026-01-26 15:03:22 +00:00
Likewise, when an empty file is expected, use "compare /dev/null out", not "compare out /dev/null". I.e., specify the expected/desired contents via the first file name. Prompted by a suggestion from Bruno Haible in http://thread.gmane.org/gmane.comp.gnu.grep.bugs/4020/focus=29154 Run these commands: git grep -l -E 'compare [^ ]+ exp' \ |xargs perl -pi -e 's/\b(compare) (\S+) (exp\S*)/$1 $3 $2/' git grep -l -E 'compare [^ ]+ /dev/null' \ |xargs perl -pi -e 's,\b(compare) (\S+) (/dev/null),$1 $3 $2,' But manually convert this one: -compare out exp-$(echo $opt|tr ' ' _) +compare exp-$(echo $opt|tr ' ' _) out and avoid an inappropriate change to cfg.mk.
19 lines
358 B
Bash
Executable File
19 lines
358 B
Bash
Executable File
#!/bin/sh
|
|
# Ensure that no excess slash appears in diff -r output.
|
|
|
|
. "${srcdir=.}/init.sh"; path_prepend_ ../src
|
|
|
|
mkdir -p a/f b/f/g || framework_failure_
|
|
echo Only in b/f: g > expected-out || framework_failure_
|
|
|
|
fail=0
|
|
|
|
diff -r a b/ > out 2> err && fail=1
|
|
|
|
# expect no stderr
|
|
compare /dev/null err || fail=1
|
|
|
|
compare expected-out out || fail=1
|
|
|
|
Exit $fail
|