From 2a7a2c1d3ae6e878e17fcf8950bc99357e926f5d Mon Sep 17 00:00:00 2001 From: Akim Demaille Date: Sat, 2 May 2020 07:23:58 +0200 Subject: [PATCH] tests: beware of mbswidth portability issues Shy away from these issues on Cygwin. Reported Denis Excoffier. https://lists.gnu.org/r/bug-bison/2020-05/msg00003.html * tests/diagnostics.at (Tabulations and multibyte characters): Split in two. --- tests/diagnostics.at | 38 ++++++++++++++++++++++++++------------ 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/tests/diagnostics.at b/tests/diagnostics.at index 150dd00b..6c23ddb6 100644 --- a/tests/diagnostics.at +++ b/tests/diagnostics.at @@ -220,15 +220,14 @@ exp: an\005error. AT_TEST([[Tabulations and multibyte characters]], [[%% -exp: a b c d e f g h +exp: a b c d e f g a: { } b: { } c: {------------} d: {éééééééééééé} -e: {∇⃗×𝐸⃗ = -∂𝐵⃗/∂t} -f: { 42 } -g: { "฿¥$€₦" } -h: { 🐃 } +e: { 42 } +f: { "฿¥$€₦" } +g: { 🐃 } ]], [0], [[input.y:11.4-17: warning: empty rule without %empty [-Wempty-rule] @@ -248,24 +247,39 @@ input.y:14.4-17: warning: empty rule without %empty [^~~~~~~~~~~~~~ | %empty input.y:15.4-17: warning: empty rule without %empty [-Wempty-rule] - 15 | e: {∇⃗×𝐸⃗ = -∂𝐵⃗/∂t} + 15 | e: { 42 } | ^~~~~~~~~~~~~~ | %empty input.y:16.4-17: warning: empty rule without %empty [-Wempty-rule] - 16 | f: { 42 } + 16 | f: { "฿¥$€₦" } | ^~~~~~~~~~~~~~ | %empty input.y:17.4-17: warning: empty rule without %empty [-Wempty-rule] - 17 | g: { "฿¥$€₦" } - | ^~~~~~~~~~~~~~ - | %empty -input.y:18.4-17: warning: empty rule without %empty [-Wempty-rule] - 18 | h: { 🐃 } + 17 | g: { 🐃 } | ^~~~~~~~~~~~~~ | %empty input.y: 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} +]], +[0], +[[input.y:10.4-17: warning: empty rule without %empty [-Wempty-rule] + 10 | e: {∇⃗×𝐸⃗ = -∂𝐵⃗/∂t} + | ^~~~~~~~~~~~~~ + | %empty +input.y: warning: fix-its can be applied. Rerun with option '--update'. [-Wother] +]]) +;; +esac + ## --------------- ## ## Special files. ##