From a434ec0e19840119c82e23101da220c32a321442 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Thu, 26 Nov 2020 16:23:18 -0800 Subject: [PATCH] Remove '--import' from regex string match tests The '--import' flag was used for importing named capture groups, but it was decided to always import them unconditionally. This flag was causing the tests to fail. --- tests/checks/regex-import.fish | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/checks/regex-import.fish b/tests/checks/regex-import.fish index 9ebc3196e..9913d3a77 100644 --- a/tests/checks/regex-import.fish +++ b/tests/checks/regex-import.fish @@ -2,32 +2,32 @@ # Tests for importing named regex groups as fish variables # Capture first match -echo "hello world" | string match --regex -q --import -- '(?[^ ]+) ?' +echo "hello world" | string match --regex -q -- '(?[^ ]+) ?' printf "%s\n" $words # CHECK: hello # Capture multiple matches -echo "hello world" | string match --regex -q --import --all -- '(?[^ ]+) ?' +echo "hello world" | string match --regex -q --all -- '(?[^ ]+) ?' printf "%s\n" $words # CHECK: hello # CHECK: world # Capture multiple variables -echo "hello world" | string match -rqI -- '^(?[^ ]+) (?.*)$' +echo "hello world" | string match -rq -- '^(?[^ ]+) (?.*)$' printf "%s\n" $word1 $word2 # CHECK: hello # CHECK: world # Clear variables on no match set foo foo -echo "foo" | string match -rqI -- '^(?bar)$' +echo "foo" | string match -rq -- '^(?bar)$' echo $foo # CHECK: # Named group may be empty in some of the matches set word set punctuation -echo "hello world, boy!" | string match -a -qrI -- '(?[^ .,!;]+)(?[.,!;])?' +echo "hello world, boy!" | string match -a -qr -- '(?[^ .,!;]+)(?[.,!;])?' echo $word # CHECK: hello world boy printf "%s\n" $punctuation