mirror of
https://github.com/systemd/systemd-stable.git
synced 2025-01-22 22:03:43 +03:00
[PATCH] add tests to catch whitespace and comment config file parsing errors.
This commit is contained in:
parent
093bf8f4d2
commit
281ff00a61
@ -101,6 +101,39 @@ EOF
|
||||
expected => "visor" ,
|
||||
conf => <<EOF
|
||||
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
|
||||
},
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user