diff options
author | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-06-26 17:02:24 +0200 |
---|---|---|
committer | Yu Watanabe <watanabe.yu+github@gmail.com> | 2021-06-26 17:02:24 +0200 |
commit | 33989b967e30acc3f29f9cf9af3eec1817fd508e (patch) | |
tree | 968dec887650d3eb2d4b705a1de53e2bf6e59104 /test/udev-test.pl | |
parent | udev: reduce scope of variables (diff) | |
download | systemd-33989b967e30acc3f29f9cf9af3eec1817fd508e.tar.xz systemd-33989b967e30acc3f29f9cf9af3eec1817fd508e.zip |
udev-test: add a testcase for string_escape=replace
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-x | test/udev-test.pl | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl index 5b1e33504e..5c1b364848 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -1165,6 +1165,21 @@ SYMLINK=" first name-\$env{WITH_WS}-end another_symlink a b c " EOF }, { + desc => "symlink with env which contain slash (see #19309)", + devices => [ + { + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_links => ["first", "name-aaa_bbb_ccc-end", + "another_symlink", "a", "b", "c"], + not_exp_links => ["ame-aaa/bbb/ccc-end"], + }], + rules => <<EOF +ENV{WITH_SLASH}="aaa/bbb/ccc" +OPTIONS="string_escape=replace", ENV{REPLACED}="\$env{WITH_SLASH}" +SYMLINK=" first name-\$env{REPLACED}-end another_symlink a b c " +EOF + }, + { desc => "symlink creation (same directory)", devices => [ { |