Re: [PATCH] tests: use skip_ consistently.

2020-01-08 Thread Jim Meyering
On Wed, Jan 8, 2020 at 2:03 PM Karl Berry  wrote:
>
> how about this instead? (feels a little like removing a double negative):
>   test "$EMACS" = t && EMACS=emacs
>
> Indeed, that looks a lot more natural, but as far as I can see, the
> problem is Automake's pervasive use of set -e.
>
> sh-4.2$ test "$FOO" = t && FOO=foo
> sh-4.2$ echo $?
> 1

Oh yeah. Then this, I guess:

  test "$EMACS" = t && EMACS=emacs || :

or "|| true" as you said.



Re: [PATCH] tests: use skip_ consistently.

2020-01-08 Thread Karl Berry
how about this instead? (feels a little like removing a double negative):
  test "$EMACS" = t && EMACS=emacs

Indeed, that looks a lot more natural, but as far as I can see, the
problem is Automake's pervasive use of set -e.

sh-4.2$ test "$FOO" = t && FOO=foo
sh-4.2$ echo $?
1

Thus the test failed when I tried it with $EMACS != t.

The need for circumlotions (double negatives or adding ||true or
if-then-else statements or whatever) is precisely why I don't much care
for set -e in my own code, although I fully realize it has its benefits
too, and certainly don't propose changing it now.

Anyway, if you prefer some other variant stylistically, fine by me.
--thanks, karl.