2 # vim:ts=4:sw=4:expandtab
4 # Regression test: New windows were not opened in the correct place if they
5 # matched an assignment.
6 # Wrong behaviour manifested itself up to (including) commit
7 # f78caf8c5815ae7a66de9e4b734546fd740cc19d
9 use i3test i3_autostart => 0;
13 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
15 assign [title="testcase"] targetws
18 my $pid = launch_with_config($config);
20 my $i3 = i3(get_socket_path(0));
22 cmd 'workspace targetws';
24 open_window(name => "testcase");
25 is_num_children('targetws', 1, 'precisely one window');
27 open_window(name => "testcase");
28 is_num_children('targetws', 2, 'precisely two windows');
32 open_window(name => "testcase");
33 is_num_children('targetws', 2, 'still two windows');
35 # focus parent. the new window should now be opened right next to the last one.
38 open_window(name => "testcase");
39 is_num_children('targetws', 3, 'new window opened next to last one');
41 exit_gracefully($pid);