summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorpatmans@us.ibm.com <patmans@us.ibm.com>2004-03-04 00:55:22 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:35:08 -0700
commit56c963dc4d8a65a8f2f23ae329f2088fabbf3303 (patch)
treed8c63815778b2d1f876c2dea969380b18962ad3b /test
parent27c3403dd810e53f6c9b8dffe34af7798a4b52d3 (diff)
[PATCH] add tests for NAME="foo-%c{N}"
Here is a patch for some new tests.
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 6b7f515442..60cf16901c 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 => "characters before the %c{N} substitution",
+ subsys => "block",
+ devpath => "block/sda/sda3",
+ expected => "my-foo9" ,
+ conf => <<EOF
+BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="sda3", NAME="my-%c{7}"
+EOF
+ },
+ {
+ desc => "substitute the second to last argument",
+ subsys => "block",
+ devpath => "block/sda/sda3",
+ expected => "my-foo8" ,
+ conf => <<EOF
+BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="sda3", NAME="my-%c{6}"
+EOF
+ },
+ {
desc => "program result substitution (numbered part of)",
subsys => "block",
devpath => "block/sda/sda3",