aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorKay Sievers <kay.sievers@vrfy.org>2008-10-25 03:00:03 +0200
committerKay Sievers <kay.sievers@vrfy.org>2008-10-25 03:00:03 +0200
commit91a75e4ad4071d9d0ce1adb5c8d8272aac379d0a (patch)
tree115c3a7922255abcf94cd42c02bb927ba605baf5 /test
parentb62557daff59dbe3096dc31ac1f42a20ff6a9f92 (diff)
downloadudev-91a75e4ad4071d9d0ce1adb5c8d8272aac379d0a.tar.gz
match KEY="A|B" without temporary string copy
Diffstat (limited to 'test')
-rwxr-xr-xtest/udev-test.pl25
1 files changed, 25 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 9725aff5..f630b74a 100755
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -1451,6 +1451,31 @@ KERNEL=="dontknow*|ttyACM*|nothing*", NAME="right"
EOF
},
{
+ desc => "test multi matches 3",
+ subsys => "tty",
+ devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+ exp_name => "right",
+ rules => <<EOF
+KERNEL=="dontknow|nothing", NAME="nomatch"
+KERNEL=="dontknow|ttyACM0a|nothing|attyACM0", NAME="wrong1"
+KERNEL=="X|attyACM0|dontknow|ttyACM0a|nothing|attyACM0", NAME="wrong2"
+KERNEL=="dontknow|ttyACM0|nothing", NAME="right"
+EOF
+ },
+ {
+ desc => "test multi matches 4",
+ subsys => "tty",
+ devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0",
+ exp_name => "right",
+ rules => <<EOF
+KERNEL=="dontknow|nothing", NAME="nomatch"
+KERNEL=="dontknow|ttyACM0a|nothing|attyACM0", NAME="wrong1"
+KERNEL=="X|attyACM0|dontknow|ttyACM0a|nothing|attyACM0", NAME="wrong2"
+KERNEL=="all|dontknow|ttyACM0", NAME="right"
+KERNEL=="ttyACM0a|nothing", NAME="wrong3"
+EOF
+ },
+ {
desc => "IMPORT parent test sequence 1/2 (keep)",
subsys => "block",
devpath => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",