]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
udev-test: add a testcase for string_escape=replace 20042/head
authorYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 Jun 2021 15:02:24 +0000 (00:02 +0900)
committerYu Watanabe <watanabe.yu+github@gmail.com>
Sat, 26 Jun 2021 15:02:24 +0000 (00:02 +0900)
test/udev-test.pl

index 5b1e33504e0efc50b342e423106976faed5b0151..5c1b364848c6a4d9f5db5a70694e494b5faa1932 100755 (executable)
@@ -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
         },
         {