From dfcb4b811c29bb646e24505ccd8b55b2a7b1f145 Mon Sep 17 00:00:00 2001 From: Fabian Homborg Date: Mon, 28 Sep 2020 17:48:42 +0200 Subject: [PATCH] tests: Regex the width tests Some wcwidths are old. Belongs to #7340. --- tests/checks/string.fish | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/tests/checks/string.fish b/tests/checks/string.fish index 511082521..57bc5bae8 100644 --- a/tests/checks/string.fish +++ b/tests/checks/string.fish @@ -56,16 +56,17 @@ echo \|(string pad --width 10 --right foo)\| # Pad string with multi-width emoji. string pad -w 4 -c . 🐟 -# CHECK: ..🐟 +# NOTE: These are regex'd because the testing system might have an older/newer wcwidth. +# CHECK: .{{.*}}🐟 # Pad with multi-width character. string pad -w 3 -c 🐟 . -# CHECK: 🐟. +# CHECK: {{🐟+}}. # Multi-width pad with remainder, complemented with a space. string pad -w 4 -c 🐟 k kk -# CHECK: 🐟 k -# CHECK: 🐟kk +# CHECK: {{🐟+}} k +# CHECK: {{🐟+}}kk # Pad to the maximum length. string pad -c . long longer longest