chiark / gitweb /
[PATCH] conditional remove of trailing sysfs whitespace
[elogind.git] / test / udev-test.pl
index 60cf16901c13d90a3daf668e1ed013d62241975d..38ea0181f6c42b05795a9ce660ea07f31f089d30 100644 (file)
@@ -465,6 +465,25 @@ EOF
                conf     => <<EOF
 BUS="scsi", ID="*:0:0:0", NAME="scsi-0:0:0:0"
 BUS="scsi", ID="0:0:0:0", NAME="bad"
+EOF
+       },
+       {
+               desc     => "ignore SYSFS attribute whitespace",
+               subsys   => "block",
+               devpath  => "block/sda",
+               expected => "ignored",
+               conf     => <<EOF
+BUS="scsi", SYSFS{whitespace_test}="WHITE  SPACE", NAME="ignored"
+EOF
+       },
+       {
+               desc     => "do not ignore SYSFS attribute whitespace",
+               subsys   => "block",
+               devpath  => "block/sda",
+               expected => "matched-with-space",
+               conf     => <<EOF
+BUS="scsi", SYSFS{whitespace_test}="WHITE  SPACE ", NAME="wrong-to-ignore"
+BUS="scsi", SYSFS{whitespace_test}="WHITE  SPACE   ", NAME="matched-with-space"
 EOF
        },
 );