]> err.no Git - systemd/commitdiff
[PATCH] add tests for NAME="foo-%c{N}"
authorpatmans@us.ibm.com <patmans@us.ibm.com>
Thu, 4 Mar 2004 08:55:22 +0000 (00:55 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:35:08 +0000 (21:35 -0700)
Here is a patch for some new tests.

test/udev-test.pl

index 6b7f515442531b102b29f80164637a9edcd8fef9..60cf16901c13d90a3daf668e1ed013d62241975d 100644 (file)
@@ -259,6 +259,24 @@ EOF
                expected => "foo9" ,
                conf     => <<EOF
 BUS="scsi", PROGRAM="/bin/echo -n foo3 foo4 foo5 foo6 foo7 foo8 foo9", KERNEL="sda3", NAME="%c{7}"
+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
        },
        {