daandemeyer / rpms / systemd

Forked from rpms/systemd 2 years ago
Clone
21255d
From 66c41fbbeb472563993724352b1984aa3e7e47db Mon Sep 17 00:00:00 2001
21255d
From: Yu Watanabe <watanabe.yu+github@gmail.com>
21255d
Date: Tue, 19 Feb 2019 09:22:45 +0900
21255d
Subject: [PATCH] test-udev: add more tests for line continuations and comments
21255d
21255d
(cherry picked from commit d35976c670b0e5c2d4081b781e5af88c0689ff00)
21255d
21255d
Related: #1642728
21255d
---
21255d
 test/udev-test.pl | 12 ++++++++++--
21255d
 1 file changed, 10 insertions(+), 2 deletions(-)
21255d
21255d
diff --git a/test/udev-test.pl b/test/udev-test.pl
21255d
index 58b5dc85e1..a5e1f8cda3 100755
21255d
--- a/test/udev-test.pl
21255d
+++ b/test/udev-test.pl
21255d
@@ -1453,13 +1453,21 @@ TAGS=="test1", TAGS=="test500", TAGS=="test1234", TAGS=="test9999", TAGS=="test1
21255d
 EOF
21255d
         },
21255d
         {
21255d
-                desc            => "don't crash with lots of tags with continuation",
21255d
+                desc            => "continuations",
21255d
                 devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda",
21255d
                 exp_name        => "found",
21255d
                 not_exp_name    => "bad" ,
21255d
                 rules           => $rules_10k_tags_continuation . <
21255d
 TAGS=="test1", TAGS=="test500", TAGS=="test1234", TAGS=="test9999", TAGS=="test10000", SYMLINK+="bad"
21255d
-KERNEL=="sda", SYMLINK+="found"
21255d
+KERNEL=="sda",\\
21255d
+# comment in continuation
21255d
+TAG+="hoge1",\\
21255d
+  # space before comment
21255d
+TAG+="hoge2",\\
21255d
+# spaces before and after token are dropped
21255d
+  TAG+="hoge3",   \\
21255d
+TAG+="hoge4"
21255d
+TAGS=="hoge1", TAGS=="hoge2", TAGS=="hoge3", TAGS=="hoge4", SYMLINK+="found"
21255d
 EOF
21255d
         },
21255d
 );