diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-02-21 10:03:32 +0100 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2019-02-21 22:50:20 +0100 |
commit | 84a0819c9d89a2ddb195a5d975ae1fd5c62fde3c (patch) | |
tree | 87639d8065beaff58de1ca62a7c93cf2840df129 /test/udev-test.pl | |
parent | udev-rules: do not ignore short lines (diff) | |
download | systemd-84a0819c9d89a2ddb195a5d975ae1fd5c62fde3c.tar.xz systemd-84a0819c9d89a2ddb195a5d975ae1fd5c62fde3c.zip |
test-udev: add more tests for line continuation
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-x | test/udev-test.pl | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl index a5e1f8cda3..002fabd9fd 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -1466,10 +1466,44 @@ TAG+="hoge1",\\ TAG+="hoge2",\\ # spaces before and after token are dropped TAG+="hoge3", \\ +\\ + \\ TAG+="hoge4" TAGS=="hoge1", TAGS=="hoge2", TAGS=="hoge3", TAGS=="hoge4", SYMLINK+="found" EOF }, + { + desc => "continuations with empty line", + 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 +# empty line finishes continuation +KERNEL=="sda", TAG+="foo" \\ + +KERNEL=="sdb", TAG+="hoge" +KERNEL=="sda", TAG+="aaa" \\ +KERNEL=="sdb", TAG+="bbb" +TAGS=="foo", SYMLINK+="found" +TAGS=="aaa", SYMLINK+="bad" +EOF + }, + { + desc => "continuations with white only line", + 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 +# space only line finishes continuation +KERNEL=="sda", TAG+="foo" \\ + \t +KERNEL=="sdb", TAG+="hoge" +KERNEL=="sda", TAG+="aaa" \\ +KERNEL=="sdb", TAG+="bbb" +TAGS=="foo", SYMLINK+="found" +TAGS=="aaa", SYMLINK+="bad" +EOF + }, ); sub udev { |