]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/183-config-variables.t
tests: replace http:// with https:// where appropriate
[i3/i3] / testcases / t / 183-config-variables.t
index 1da25a651c34f1cbe87605bc4b705f4e079a94b5..4b225214addca64097047ac2722408fb18395ebe 100644 (file)
@@ -1,6 +1,19 @@
 #!perl
 # vim:ts=4:sw=4:expandtab
 #
+# Please read the following documents before working on tests:
+# • https://build.i3wm.org/docs/testsuite.html
+#   (or docs/testsuite)
+#
+# • https://build.i3wm.org/docs/lib-i3test.html
+#   (alternatively: perldoc ./testcases/lib/i3test.pm)
+#
+# • https://build.i3wm.org/docs/ipc.html
+#   (or docs/ipc)
+#
+# • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
+#   (unless you are already familiar with Perl)
+#
 # Checks that variables are parsed correctly by using for_window rules with
 # variables in it.
 #
@@ -66,6 +79,22 @@ EOT
 
 is(launch_get_border($config), 'none', 'no border');
 
+#####################################################################
+# test that longest matching variable name is substituted
+#####################################################################
+
+$config = <<'EOT';
+# i3 config file (v4)
+font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
+
+set $var normal title
+set $vartest special title
+set $vart mundane title
+for_window [title="$vartest"] border none
+EOT
+
+is(launch_get_border($config), 'none', 'no border');
+
 
 
 done_testing;