mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-12-22 13:33:56 +03:00
test: add test cases for empty string match
This commit is contained in:
parent
067cc51f2e
commit
48d26c9085
@ -1256,6 +1256,72 @@ KERNEL=="dontknow|ttyACM0a|nothing|attyACM0", SYMLINK+="wrong1"
|
||||
KERNEL=="X|attyACM0|dontknow|ttyACM0a|nothing|attyACM0", SYMLINK+="wrong2"
|
||||
KERNEL=="all|dontknow|ttyACM0", SYMLINK+="right"
|
||||
KERNEL=="ttyACM0a|nothing", SYMLINK+="wrong3"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "test multi matches 5",
|
||||
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="foo"
|
||||
TAGS=="|foo", SYMLINK+="found"
|
||||
TAGS=="|aaa", SYMLINK+="bad"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "test multi matches 6",
|
||||
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=""
|
||||
TAGS=="|foo", SYMLINK+="found"
|
||||
TAGS=="aaa|bbb", SYMLINK+="bad"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "test multi matches 7",
|
||||
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="foo"
|
||||
TAGS=="foo||bar", SYMLINK+="found"
|
||||
TAGS=="aaa||bbb", SYMLINK+="bad"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "test multi matches 8",
|
||||
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=""
|
||||
TAGS=="foo||bar", SYMLINK+="found"
|
||||
TAGS=="aaa|bbb", SYMLINK+="bad"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "test multi matches 9",
|
||||
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="foo"
|
||||
TAGS=="foo|", SYMLINK+="found"
|
||||
TAGS=="aaa|", SYMLINK+="bad"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
desc => "test multi matches 10",
|
||||
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=""
|
||||
TAGS=="foo|", SYMLINK+="found"
|
||||
TAGS=="aaa|bbb", SYMLINK+="bad"
|
||||
EOF
|
||||
},
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user