21255d
From 03b766cc937ffa4dcb7cfb25b2ac20d8a00cb6db Mon Sep 17 00:00:00 2001
21255d
From: gaoyi <ymuemc@163.com>
21255d
Date: Sun, 12 Jul 2020 03:27:45 -0400
21255d
Subject: [PATCH] test: add test case for multi matches when use "||"
21255d
21255d
Signed-off-by: gaoyi <ymuemc@163.com>
21255d
(cherry picked from commit 0d3a8bc7ebd76591e14f7098b4266fd2065ac4db)
21255d
21255d
Related: #1642728
21255d
---
21255d
 test/udev-test.pl | 11 +++++++++++
21255d
 1 file changed, 11 insertions(+)
21255d
21255d
diff --git a/test/udev-test.pl b/test/udev-test.pl
21255d
index 50d978391b..4bf97d82bb 100755
21255d
--- a/test/udev-test.pl
21255d
+++ b/test/udev-test.pl
21255d
@@ -1322,6 +1322,17 @@ EOF
21255d
 KERNEL=="sda", TAG=""
21255d
 TAGS=="foo|", SYMLINK+="found"
21255d
 TAGS=="aaa|bbb", SYMLINK+="bad"
21255d
+EOF
21255d
+        },
21255d
+        {
21255d
+                desc            => "test multi matches 11",
21255d
+                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
21255d
+                exp_name        => "found",
21255d
+                not_exp_name    => "bad",
21255d
+                rules           => <
21255d
+KERNEL=="sda", TAG="c"
21255d
+TAGS=="foo||bar||c", SYMLINK+="found"
21255d
+TAGS=="aaa||bbb||ccc", SYMLINK+="bad"
21255d
 EOF
21255d
         },
21255d
         {