+EOF
+ },
+ {
+ desc => "final assignment",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "ok",
+ exp_perms => "root:nobody:0640",
+ rules => <<EOF
+KERNEL=="sda", GROUP:="nobody"
+KERNEL=="sda", GROUP="not-ok", MODE="0640", NAME="ok"
+EOF
+ },
+ {
+ desc => "final assignment",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "ok",
+ exp_perms => "root:nobody:0640",
+ rules => <<EOF
+KERNEL=="sda", GROUP:="nobody"
+SUBSYSTEM=="block", MODE:="640"
+KERNEL=="sda", GROUP="not-ok", MODE="0666", NAME="ok"
+EOF
+ },
+ {
+ desc => "env substitution",
+ subsys => "block",
+ devpath => "/block/sda",
+ exp_name => "node-add-me",
+ rules => <<EOF
+KERNEL=="sda", MODE="0666", NAME="node-\$env{ACTION}-me"
+EOF
+ },
+ {
+ desc => "reset list to current value",
+ subsys => "tty",
+ devpath => "/class/tty/ttyUSB0",
+ exp_name => "three",
+ not_exp_name => "two",
+ exp_target => "node",
+ rules => <<EOF
+KERNEL=="ttyUSB[0-9]*", SYMLINK+="one"
+KERNEL=="ttyUSB[0-9]*", SYMLINK+="two"
+KERNEL=="ttyUSB[0-9]*", SYMLINK="three"
+KERNEL=="ttyUSB[0-9]*", NAME="node"
+EOF
+ },
+ {
+ desc => "test empty NAME",
+ subsys => "tty",
+ devpath => "/class/tty/ttyUSB0",
+ exp_name => "node",
+ not_exp_name => "wrong",
+ exp_add_error => "yes",
+ rules => <<EOF
+KERNEL=="ttyUSB[0-9]*", NAME=""
+KERNEL=="ttyUSB[0-9]*", NAME="wrong"
+EOF
+ },
+ {
+ desc => "test empty NAME 2",
+ subsys => "tty",
+ devpath => "/class/tty/ttyUSB0",
+ exp_name => "right",
+ rules => <<EOF
+KERNEL=="ttyUSB[0-9]*", NAME="right"
+KERNEL=="ttyUSB[0-9]*", NAME=""
+KERNEL=="ttyUSB[0-9]*", NAME="wrong"