[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: EXIT_CANCELED
From: |
Jim Meyering |
Subject: |
Re: EXIT_CANCELED |
Date: |
Sat, 24 Oct 2009 17:23:39 +0200 |
Eric Blake wrote:
> According to Jim Meyering on 10/23/2009 7:48 AM:
>>> So, how about this patch series? (I guess I should check whether this
>>> change causes any testsuite failures, and if not, add some tests.)
>
> Yes, there were some test failures that I had to fix. Even some unrelated
> failures (invalid-opt failed on cygwin 1.7, now that getopt-gnu allows
> cygwin's getopt rather than forcing gnulib's replacement). There was also
> some missing test coverage.
>
>>
>> Both look fine.
>> Adding tests would make them perfect ;-)
>
> Here's what I pushed (including the addition of two FIXMEs in
> tests/misc/env, waiting for us to decide what to do there):
...
> +# Use -- to end arguments.
> +cat <<EOF >./-i || framework_failure
> +#!/bin/sh
> +echo pass
> +EOF
> +chmod +x ./-i || framework_failure
> +case `env -i PATH="$PATH" echo good` in
> + good) ;;
> + *) fail=1 ;;
> +esac
> +case `env -- -i PATH="$PATH" echo fail` in
> + pass) ;;
> + *) fail=1 ;;
> +esac
Thanks, but that cannot work (expecting to invoke ./-i) unless you
have "." in your PATH. Since I don't, that new test fails for me.
This patch makes it pass. Does it do what you intended?
diff --git a/tests/misc/env b/tests/misc/env
index a3d435b..3b632d9 100755
--- a/tests/misc/env
+++ b/tests/misc/env
@@ -95,7 +95,7 @@ case `env -i PATH="$PATH" echo good` in
good) ;;
*) fail=1 ;;
esac
-case `env -- -i PATH="$PATH" echo fail` in
+case `PATH="$(pwd):$PATH"; export PATH; env -- -i echo fail` in
pass) ;;
*) fail=1 ;;
esac
BTW, this PATH= setting has no effect,
unless your shell lacks an "echo" built-in.
I suspect we have none of those anymore.
> +case `env -i PATH="$PATH" echo good` in
- Re: system.h cleanups, (continued)
- Re: system.h cleanups, Pádraig Brady, 2009/10/08
- Re: system.h cleanups, Jim Meyering, 2009/10/08
- Re: system.h cleanups, Eric Blake, 2009/10/08
- Re: system.h cleanups, Jim Meyering, 2009/10/08
- Re: system.h cleanups, Pádraig Brady, 2009/10/09
- Re: system.h cleanups, Eric Blake, 2009/10/09
- EXIT_CANCELED (was: system.h cleanups), Eric Blake, 2009/10/23
- Re: EXIT_CANCELED, Pádraig Brady, 2009/10/23
- Re: EXIT_CANCELED, Jim Meyering, 2009/10/23
- Re: EXIT_CANCELED, Eric Blake, 2009/10/23
- Re: EXIT_CANCELED,
Jim Meyering <=
- Re: EXIT_CANCELED, Eric Blake, 2009/10/24