Skip to content

Commit

Permalink
patch env.sh: seperate testing of -a and -argv0 makes more sence
Browse files Browse the repository at this point in the history
  • Loading branch information
cre4ture committed Mar 31, 2024
1 parent dfb629b commit e8346fb
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 1 deletion.
2 changes: 1 addition & 1 deletion util/build-gnu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -221,7 +221,7 @@ grep -rlE '/usr/local/bin/\s?/usr/local/bin' init.cfg tests/* | xargs -r sed -Ei
# we should not regress our project just to match what GNU is going.
# So, do some changes on the fly

patch -N -r - -d "$path_GNU" -p 1 -i "`realpath \"$path_UUTILS/util/gnu-patches/tests_env_env-S.pl.patch\"`" || true
eval cat "$path_UUTILS/util/gnu-patches/*.patch" | patch -N -r - -d "$path_GNU" -p 1 -i - || true

sed -i -e "s|rm: cannot remove 'e/slink'|rm: cannot remove 'e'|g" tests/rm/fail-eacces.sh

Expand Down
14 changes: 14 additions & 0 deletions util/gnu-patches/tests_env_env.sh.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
diff --git a/tests/env/env.sh b/tests/env/env.sh
index d8f520299..29e90aaba 100755
--- a/tests/env/env.sh
+++ b/tests/env/env.sh
@@ -165,7 +165,8 @@ test "$exp" = "$got" || fail=1

# Verify argv0 overriding
for arg in 'argv0' ''; do
-env -v -a short --argv0=$arg true 2>err || fail=1
+env -v --argv0=$arg true 2>err || fail=1
+env -v -a $arg true 2>err || fail=1
cat <<EOF >err_exp || framework_failure_
argv0: '$arg'
executing: true

0 comments on commit e8346fb

Please sign in to comment.