1
0
mirror of https://github.com/systemd/systemd.git synced 2025-01-26 14:04:03 +03:00

udev-test: add a testcase for string_escape=replace

This commit is contained in:
Yu Watanabe 2021-06-27 00:02:24 +09:00
parent 7dc846f99a
commit 33989b967e

View File

@ -1162,6 +1162,21 @@ EOF
rules => <<EOF
ENV{WITH_WS}=" one two three "
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
},
{