X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F183-config-variables.t;h=65f166794dce4534736e70d1a76e4ebad5b22875;hb=eaf7a49e28b7ff8e1820a1b23350647574a0ed5a;hp=1da25a651c34f1cbe87605bc4b705f4e079a94b5;hpb=e7761a342bcbb6668e9cc710570f55be623c7373;p=i3%2Fi3 diff --git a/testcases/t/183-config-variables.t b/testcases/t/183-config-variables.t index 1da25a65..65f16679 100644 --- a/testcases/t/183-config-variables.t +++ b/testcases/t/183-config-variables.t @@ -1,6 +1,19 @@ #!perl # vim:ts=4:sw=4:expandtab # +# Please read the following documents before working on tests: +# • http://build.i3wm.org/docs/testsuite.html +# (or docs/testsuite) +# +# • http://build.i3wm.org/docs/lib-i3test.html +# (alternatively: perldoc ./testcases/lib/i3test.pm) +# +# • http://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;