From da8d0baa74c425712c1cb58960f987326c7eda32 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Sat, 17 Dec 2011 11:18:43 +0000 Subject: [PATCH] tests: add test for previous commit --- testcases/t/183-config-variables.t | 72 ++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 testcases/t/183-config-variables.t diff --git a/testcases/t/183-config-variables.t b/testcases/t/183-config-variables.t new file mode 100644 index 00000000..1da25a65 --- /dev/null +++ b/testcases/t/183-config-variables.t @@ -0,0 +1,72 @@ +#!perl +# vim:ts=4:sw=4:expandtab +# +# Checks that variables are parsed correctly by using for_window rules with +# variables in it. +# + +use i3test i3_autostart => 0; + +# starts i3 with the given config, opens a window, returns its border style +sub launch_get_border { + my ($config) = @_; + + my $pid = launch_with_config($config); + + my $i3 = i3(get_socket_path(0)); + my $tmp = fresh_workspace; + + my $window = open_window(name => 'special title'); + + my @content = @{get_ws_content($tmp)}; + cmp_ok(@content, '==', 1, 'one node on this workspace now'); + my $border = $content[0]->{border}; + + exit_gracefully($pid); + + return $border; +} + +##################################################################### +# test thet windows get the default border +##################################################################### + +my $config = <