# 012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789012345678901234567890123456789
KERNEL="sda1", NAME=="no"
KERNEL=="sda1", NAME="yes"
+EOF
+ },
+ {
+ desc => "magic subsys/kernel lookup",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "00:e0:00:fb:04:e1",
+ rules => <<EOF
+KERNEL=="sda", NAME="\$attr{[net/eth0]address}"
+EOF
+ },
+ {
+ desc => "TEST absolute path",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "there",
+ rules => <<EOF
+TEST=="/etc/hosts", NAME="there"
+NAME="notthere"
+EOF
+ },
+ {
+ desc => "TEST subsys/kernel lookup",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "yes",
+ rules => <<EOF
+KERNEL=="sda", TEST=="[net/eth0]", NAME="yes"
+EOF
+ },
+ {
+ desc => "TEST relative path",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "relative",
+ rules => <<EOF
+KERNEL=="sda", TEST=="size", NAME="relative"
EOF
},
);