summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/udev-test.pl18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 38ea0181f6..dadec568ba 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -262,6 +262,24 @@ BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="s
EOF
},
{
+ desc => "program with subshell",
+ subsys => "block",
+ devpath => "block/sda/sda3",
+ expected => "bar9" ,
+ conf => <<EOF
+BUS="scsi", PROGRAM="/bin/sh -c 'echo foo3 foo4 foo5 foo6 foo7 foo8 foo9 | sed s/foo9/bar9/'", KERNEL="sda3", NAME="%c{7}"
+EOF
+ },
+ {
+ desc => "program arguments combined with apostrophes",
+ subsys => "block",
+ devpath => "block/sda/sda3",
+ expected => "foo7" ,
+ conf => <<EOF
+BUS="scsi", PROGRAM="/bin/echo -n 'foo3 foo4' 'foo5 foo6 foo7 foo8'", KERNEL="sda3", NAME="%c{5}"
+EOF
+ },
+ {
desc => "characters before the %c{N} substitution",
subsys => "block",
devpath => "block/sda/sda3",