From 32f44f4bfb33d856f24329914b9bc91451f4d634 Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sun, 3 May 2020 19:08:16 +0200 Subject: [PATCH] tests: really skip tricky multichar test on Cygwin In Autotest, anything outside AT_SETUP/AT_CLEANUP is discarded. * tests/diagnostics.at (AT_TEST): Accept a skip-if test. Use it to skip on cygwin. --- tests/diagnostics.at | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/tests/diagnostics.at b/tests/diagnostics.at index 6c23ddb6..46af89c4 100644 --- a/tests/diagnostics.at +++ b/tests/diagnostics.at @@ -19,7 +19,7 @@ AT_BANNER([[Diagnostics.]]) # AT_TEST($1: TITLE, $2: GRAMMAR, $3: EXIT-STATUS, $4: OUTPUT-WITH-STYLE, -# $5: EXTRA_ENV +# $5: EXTRA_ENV, $6: SKIP-IF) # ----------------------------------------------------------------------- # Run Bison on GRAMMAR with debugging style enabled, and expect # OUTPUT-WITH-STYLE as diagnostics. @@ -33,6 +33,9 @@ AT_KEYWORDS([diagnostics]) locale=`locale -a | $EGREP '^en_US\.(UTF-8|utf8)$' | sed 1q` AT_SKIP_IF([test x == x"$locale"]) +m4_ifval([$6], +[AT_SKIP_IF([$6])]) + AT_BISON_OPTION_PUSHDEFS AT_DATA_GRAMMAR([[input.y]], [$2]) @@ -261,11 +264,9 @@ input.y:17.4-17: warning: empty rule without %empty [warning: fix-its can be applied. Rerun with option '--update'. [-Wother] ]]) + # Likewise, but currently not portable to Cygwin. # https://lists.gnu.org/r/bug-bison/2020-05/msg00003.html. -case `uname -a` in - (CYGWIN*);; - (*) AT_TEST([[Tabulations and multibyte characters]], [[%% e: {βˆ‡βƒ—Γ—πΈβƒ— = -βˆ‚π΅βƒ—/βˆ‚t} @@ -276,9 +277,7 @@ e: {βˆ‡βƒ—Γ—πΈβƒ— = -βˆ‚π΅βƒ—/βˆ‚t} | ^~~~~~~~~~~~~~ | %empty input.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother] -]]) -;; -esac +]], [], [uname -a | grep -i cygwin]) ## --------------- ##