]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: dont use anchor char '$' to match a part of a string
authorFranck Bui <fbui@suse.com>
Thu, 27 Apr 2023 07:04:00 +0000 (09:04 +0200)
committerMike Yuan <me@yhndnzj.com>
Thu, 27 Apr 2023 14:42:51 +0000 (22:42 +0800)
When anchoring the pattern using '$' regular expression operator it forces '=~'
operator to match the entire string.

test/units/testsuite-73.sh

index d13ebaadbdf3dc533bf977a9cb5f4f00b3d45d18..8f33baf8794e469c32e1d82ffee89290449dd90d 100755 (executable)
@@ -264,12 +264,12 @@ test_vc_keymap() {
             assert_in "XKBOPTIONS=terminate:ctrl_alt_bksp" "$vc"
         elif [[ "$i" == "us-acentos" ]]; then
             assert_in "X11 Layout: us" "$output"
-            assert_in 'X11 Model: pc105$' "$output"
+            assert_in "X11 Model: pc105" "$output"
             assert_in "X11 Variant: intl" "$output"
             assert_in "X11 Options: terminate:ctrl_alt_bksp" "$output"
 
             assert_in "XKBLAYOUT=us" "$vc"
-            assert_in "XKBMODEL=pc105$" "$vc"
+            assert_in "XKBMODEL=pc105" "$vc"
             assert_in "XKBVARIANT=intl" "$vc"
             assert_in "XKBOPTIONS=terminate:ctrl_alt_bksp" "$vc"
         elif [[ "$i" =~ ^us-.* ]]; then