tests: avoid a spurious failure on NetBSD
[platform/upstream/automake.git] / t / lex-lib-external.sh
index 21802c5..5a2e3c3 100755 (executable)
@@ -18,7 +18,7 @@
 # library, if that's available.
 
 required='cc lex'
-. ./defs || Exit 1
+. test-init.sh
 
 cat >> configure.ac << 'END'
 AC_PROG_CC
@@ -69,9 +69,9 @@ $MAKE have-lexlib || skip_ "no system-wide lex library found"
 
 # Program should build and run and distribute.
 $MAKE all
-if cross_compiling; then :; else
+if ! cross_compiling; then
   echo GOOD | ./lexer
-  echo BAD | ./lexer && Exit 1
+  echo BAD | ./lexer && exit 1
   : For shells with busted 'set -e'.
 fi
 yl_distcheck