summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorgreg@kroah.com <greg@kroah.com>2003-12-17 18:28:05 -0800
committerGreg KH <gregkh@suse.de>2005-04-26 21:13:09 -0700
commit281ff00a611aa0a71e43dd4355b0caa918d820d2 (patch)
tree952a632d1dd6ecf505e5b84c950600d22687a729 /test
parent093bf8f4d2c44fb1f581dfec0330f3f86473496c (diff)
[PATCH] add tests to catch whitespace and comment config file parsing errors.
Diffstat (limited to 'test')
-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",