]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: add test case for multi matches when use "||" 16435/head
authorgaoyi <ymuemc@163.com>
Sun, 12 Jul 2020 07:27:45 +0000 (03:27 -0400)
committergaoyi <ymuemc@163.com>
Sun, 12 Jul 2020 07:27:45 +0000 (03:27 -0400)
Signed-off-by: gaoyi <ymuemc@163.com>
test/udev-test.pl

index 95013279b8e1aa090cf93688fa6aa0a7fe687af0..2480e4120b9492e8b9ae2a7a1c748c34a330dc41 100755 (executable)
@@ -1322,6 +1322,17 @@ EOF
 KERNEL=="sda", TAG=""
 TAGS=="foo|", SYMLINK+="found"
 TAGS=="aaa|bbb", SYMLINK+="bad"
+EOF
+        },
+        {
+                desc            => "test multi matches 11",
+                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
+                exp_name        => "found",
+                not_exp_name    => "bad",
+                rules           => <<EOF
+KERNEL=="sda", TAG="c"
+TAGS=="foo||bar||c", SYMLINK+="found"
+TAGS=="aaa||bbb||ccc", SYMLINK+="bad"
 EOF
         },
         {