summaryrefslogtreecommitdiffstats
path: root/test/udev-test.pl
diff options
context:
space:
mode:
authorYu Watanabe <watanabe.yu+github@gmail.com>2021-06-26 17:02:24 +0200
committerYu Watanabe <watanabe.yu+github@gmail.com>2021-06-26 17:02:24 +0200
commit33989b967e30acc3f29f9cf9af3eec1817fd508e (patch)
tree968dec887650d3eb2d4b705a1de53e2bf6e59104 /test/udev-test.pl
parentudev: reduce scope of variables (diff)
downloadsystemd-33989b967e30acc3f29f9cf9af3eec1817fd508e.tar.xz
systemd-33989b967e30acc3f29f9cf9af3eec1817fd508e.zip
udev-test: add a testcase for string_escape=replace
Diffstat (limited to 'test/udev-test.pl')
-rwxr-xr-xtest/udev-test.pl15
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 => [
{