tests: don't fail when --program-transform-name is used

Problem reported by Jun T <https://bugs.gnu.org/48062>.
* tests/diff3: Use --diff-program=diff since --program-transform-name
is applied after install.
* tests/help-version (sdiff_setup, diff3_setup): Likewise.
This commit is contained in:
Collin Funk 2024-06-23 03:00:21 -07:00 committed by Jim Meyering
parent da0c15f381
commit 8da1f14d84
2 changed files with 11 additions and 5 deletions

View File

@ -30,12 +30,14 @@ EOF
fail=0
diff3 a b c > out 2> err || fail=1
# Use --diff-program=diff since --program-transform-name and similar are
# applied after 'make install'.
diff3 --diff-program=diff a b c > out 2> err || fail=1
compare exp out || fail=1
compare /dev/null err || fail=1
# Repeat, but with all three files the same:
diff3 a a a > out 2> err || fail=1
diff3 --diff-program=diff a a a > out 2> err || fail=1
compare /dev/null out || fail=1
compare /dev/null err || fail=1
@ -101,7 +103,7 @@ cat <<'EOF' > exp40 || framework_failure_
3z
EOF
diff3 d e f > out 2> err
diff3 --diff-program=diff d e f > out 2> err
compare exp40 out || fail=1
compare /dev/null err || fail=1

View File

@ -170,8 +170,12 @@ egrep_setup () { args="0 $tmp_in"; }
fgrep_setup () { args="0 $tmp_in"; }
diff_setup () { args="$tmp_in $tmp_in2"; }
sdiff_setup () { args="$tmp_in $tmp_in2"; }
diff3_setup () { args="$tmp_in $tmp_in2 $tmp_in2"; }
# Use --diff-program=diff since --program-transform-name and similar are
# applied after 'make install'.
sdiff_setup () { args="--diff-program=diff $tmp_in $tmp_in2"; }
diff3_setup () { args="--diff-program=diff $tmp_in $tmp_in2 $tmp_in2"; }
cp_setup () { args="$tmp_in $tmp_in2"; }
ln_setup () { args="$tmp_in ln-target"; }
ginstall_setup () { args="$tmp_in $tmp_in2"; }