From: Dan Streetman Date: Thu, 26 Jan 2017 01:24:52 +0000 (-0500) Subject: tests: add tests for SYMLINK containing whitespace in variable (#5158) X-Git-Tag: v233~204 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=9cd7b1287b5c57f9a4d2e26cb6505908e494c88c;p=thirdparty%2Fsystemd.git tests: add tests for SYMLINK containing whitespace in variable (#5158) add udev-test.pl tests for whitespace in a substituted variable, to verify the variable whitespace is replaced with underscores. Tests for the change made by commit 0a10235ed453 ("udev-rules: perform whitespace replacement for symlink subst values") --- diff --git a/test/udev-test.pl b/test/udev-test.pl index 9723386b233..7e334790041 100755 --- a/test/udev-test.pl +++ b/test/udev-test.pl @@ -738,6 +738,86 @@ EOF not_exp_name => " ", rules => < "symlink with spaces in substituted variable", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_name => "name-one_two_three-end", + not_exp_name => " ", + rules => < "symlink with leading space in substituted variable", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_name => "name-one_two_three-end", + not_exp_name => " ", + rules => < "symlink with trailing space in substituted variable", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_name => "name-one_two_three-end", + not_exp_name => " ", + rules => < "symlink with lots of space in substituted variable", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_name => "name-one_two_three-end", + not_exp_name => " ", + rules => < "symlink with multiple spaces in substituted variable", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_name => "name-one_two_three-end", + not_exp_name => " ", + rules => < "symlink with space and var with space, part 1", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_name => "first", + not_exp_name => " ", + rules => < "symlink with space and var with space, part 2", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_name => "name-one_two_three-end", + not_exp_name => " ", + rules => < "symlink with space and var with space, part 3", + devpath => "/devices/pci0000:00/0000:00:1d.7/usb5/5-2/5-2:1.0/tty/ttyACM0", + exp_name => "another_symlink", + not_exp_name => " ", + rules => <