summaryrefslogtreecommitdiff
path: root/test/udev-test.pl
diff options
context:
space:
mode:
Diffstat (limited to 'test/udev-test.pl')
-rw-r--r--test/udev-test.pl33
1 files changed, 33 insertions, 0 deletions
diff --git a/test/udev-test.pl b/test/udev-test.pl
index 08b99f041f..7afbd0d6fc 100644
--- a/test/udev-test.pl
+++ b/test/udev-test.pl
@@ -104,6 +104,39 @@ REPLACE, KERNEL="ttyUSB0", NAME="visor"
EOF
},
{
+ desc => "Handle comment lines in config file (and replace kernel name)",
+ subsys => "tty",
+ devpath => "class/tty/ttyUSB0",
+ expected => "visor" ,
+ conf => <<EOF
+# this is a comment
+REPLACE, KERNEL="ttyUSB0", NAME="visor"
+
+EOF
+ },
+ {
+ desc => "Handle comment lines in config file with whitespace (and replace kernel name)",
+ subsys => "tty",
+ devpath => "class/tty/ttyUSB0",
+ expected => "visor" ,
+ conf => <<EOF
+ # this is a comment with whitespace before the comment
+REPLACE, KERNEL="ttyUSB0", NAME="visor"
+
+EOF
+ },
+ {
+ desc => "Handle empty lines in config file (and replace kernel name)",
+ subsys => "tty",
+ devpath => "class/tty/ttyUSB0",
+ expected => "visor" ,
+ conf => <<EOF
+
+REPLACE, KERNEL="ttyUSB0", NAME="visor"
+
+EOF
+ },
+ {
desc => "subdirectory handling",
subsys => "tty",
devpath => "class/tty/ttyUSB0",