Hello gnulibers. The attached patch fixes a minor wart in the `tests/init.sh' shell library. IMO it is simple enough not to require a copyright assigement for gnulib (which I don't have).
Regards, Stefano --- * tests/init.sh: Do not use `$ME_' and `skip_' before they are defined. ChangeLog | 6 ++++++ tests/init.sh | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-)
From 68faf1600420b0daad7191222bf47d3fbde01255 Mon Sep 17 00:00:00 2001 From: Stefano Lattarini <[email protected]> Date: Fri, 11 Jun 2010 12:19:19 +0200 Subject: [PATCH] Fix buglet in code searching for a good shell (tests/init.sh). * tests/init.sh: Do not use `$ME_' and `skip_' before they are defined. --- ChangeLog | 6 ++++++ tests/init.sh | 7 +++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 726e66a..bda991f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2010-06-11 Stefano Lattarini <[email protected]> (tiny change) + + Fix buglet in code searching for a good shell (tests/init.sh). + * tests/init.sh: Do not use `$ME_' and `skip_' before they are + defined. + 2010-06-11 Jim Meyering <[email protected]> test-sys_socket: avoid set-but-not-used warnings from gcc diff --git a/tests/init.sh b/tests/init.sh index ef0957c..4eb4a95 100644 --- a/tests/init.sh +++ b/tests/init.sh @@ -97,12 +97,15 @@ else for re_shell_ in "${CONFIG_SHELL:-no_shell}" /bin/sh bash dash zsh pdksh fail do test "$re_shell_" = no_shell && continue - test "$re_shell_" = fail && skip_ failed to find an adequate shell + if test "$re_shell_" = fail; then + echo "$0: skipped test: failed to find an adequate shell" 1>&2 + exit 77 + fi "$re_shell_" -c "$gl_shell_test_script_" 2>/dev/null if test $? = 9; then # Found an acceptable shell. exec "$re_shell_" "$0" --no-reexec "$@" - echo "$ME_: exec failed" 1>&2 + echo "$0: exec failed" 1>&2 exit 127 fi done -- 1.6.5
