]> git.sur5r.net Git - i3/i3/blob - testcases/t/530-bug-2229.t
cfe61dec693d4fe4b9a4a4d8bd1b0f0055aff7f2
[i3/i3] / testcases / t / 530-bug-2229.t
1 #!perl
2 # vim:ts=4:sw=4:expandtab
3 #
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
6 #   (or docs/testsuite)
7 #
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 #   (alternatively: perldoc ./testcases/lib/i3test.pm)
10 #
11 # • http://build.i3wm.org/docs/ipc.html
12 #   (or docs/ipc)
13 #
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 #   (unless you are already familiar with Perl)
16 #
17 # Ticket: #2229
18 # Bug still in: 4.11-262-geb631ce
19 use i3test i3_autostart => 0;
20
21 my $config = <<EOT;
22 # i3 config file (v4)
23 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
24
25 fake-outputs 400x400+0+0,400x400+400+0
26 workspace_auto_back_and_forth no
27 EOT
28
29 my $pid = launch_with_config($config);
30 my $i3 = i3(get_socket_path());
31
32 # Set it up such that workspace 3 is on the left output and
33 # workspace 4 is on the right output
34 cmd 'focus output fake-0';
35 open_window;
36 cmd 'workspace 3';
37 cmd 'focus output fake-1';
38 cmd 'workspace 4';
39 open_window;
40
41 cmd 'move workspace to output left';
42
43 # ensure that workspace 3 has now vanished
44 my $get_ws = $i3->get_workspaces->recv;
45 my @ws_names = map { $_->{name} } @$get_ws;
46 ok(!('3' ~~ @ws_names), 'workspace 3 has been closed');
47
48 exit_gracefully($pid);
49
50 done_testing;