2 # vim:ts=4:sw=4:expandtab
4 # Checks that variables are parsed correctly by using for_window rules with
8 use i3test i3_autostart => 0;
10 # starts i3 with the given config, opens a window, returns its border style
11 sub launch_get_border {
14 my $pid = launch_with_config($config);
16 my $i3 = i3(get_socket_path(0));
17 my $tmp = fresh_workspace;
19 my $window = open_window(name => 'special title');
21 my @content = @{get_ws_content($tmp)};
22 cmp_ok(@content, '==', 1, 'one node on this workspace now');
23 my $border = $content[0]->{border};
25 exit_gracefully($pid);
30 #####################################################################
31 # test thet windows get the default border
32 #####################################################################
36 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
39 is(launch_get_border($config), 'normal', 'normal border');
41 #####################################################################
42 # now use a variable and for_window
43 #####################################################################
47 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
49 set $vartest special title
50 for_window [title="$vartest"] border none
53 is(launch_get_border($config), 'none', 'no border');
55 #####################################################################
56 # check that whitespaces and tabs are ignored
57 #####################################################################
61 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
63 set $vartest special title
64 for_window [title="$vartest"] border none
67 is(launch_get_border($config), 'none', 'no border');