2 # vim:ts=4:sw=4:expandtab
3 # !NO_I3_INSTANCE! will prevent complete-run.pl from starting i3
5 # Tests the new_window and new_float config option.
10 #####################################################################
11 # 1: check that new windows start with 'normal' border unless configured
13 #####################################################################
17 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
20 my $pid = launch_with_config($config);
22 my $tmp = fresh_workspace;
24 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
26 my $first = open_window;
28 my @content = @{get_ws_content($tmp)};
29 ok(@content == 1, 'one container opened');
30 is($content[0]->{border}, 'normal', 'border normal by default');
32 exit_gracefully($pid);
34 #####################################################################
35 # 2: check that new tiling windows start with '1pixel' border when
37 #####################################################################
41 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
46 $pid = launch_with_config($config);
48 $tmp = fresh_workspace;
50 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
54 @content = @{get_ws_content($tmp)};
55 ok(@content == 1, 'one container opened');
56 is($content[0]->{border}, '1pixel', 'border normal by default');
58 exit_gracefully($pid);
60 #####################################################################
61 # 3: check that new floating windows start with 'normal' border unless
62 # configured otherwise
63 #####################################################################
67 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
70 $pid = launch_with_config($config);
72 $tmp = fresh_workspace;
74 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
76 $first = open_floating_window;
78 my $wscontent = get_ws($tmp);
79 my @floating = @{$wscontent->{floating_nodes}};
80 ok(@floating == 1, 'one floating container opened');
81 my $floatingcon = $floating[0];
82 is($floatingcon->{nodes}->[0]->{border}, 'normal', 'border normal by default');
84 exit_gracefully($pid);
86 #####################################################################
87 # 4: check that new floating windows start with '1pixel' border when
89 #####################################################################
93 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
98 $pid = launch_with_config($config);
100 $tmp = fresh_workspace;
102 ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
104 $first = open_floating_window;
106 $wscontent = get_ws($tmp);
107 @floating = @{$wscontent->{floating_nodes}};
108 ok(@floating == 1, 'one floating container opened');
109 $floatingcon = $floating[0];
110 is($floatingcon->{nodes}->[0]->{border}, '1pixel', 'border normal by default');
112 exit_gracefully($pid);