2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • https://build.i3wm.org/docs/testsuite.html
8 # • https://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • https://build.i3wm.org/docs/ipc.html
14 # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf
15 # (unless you are already familiar with Perl)
17 # Verifies that you can assign a window _and_ use for_window with a move
20 # Bug still in: 4.4-69-g6856b23
21 use i3test i3_autostart => 0;
25 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
27 assign [instance=__i3-test-window] 2
28 for_window [instance=__i3-test-window] move workspace 1
31 my $pid = launch_with_config($config);
33 # We use dont_map because i3 will not map the window on the current
34 # workspace. Thus, open_window would time out in wait_for_map (2 seconds).
35 my $window = open_window(
36 wm_class => '__i3-test-window',
43 exit_gracefully($pid);
45 ################################################################################
46 # Related bug: multiple for_window assignments caused a crash
47 ################################################################################
51 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
53 for_window [instance=__i3-test-window1] move workspace 3
54 for_window [instance=__i3-test-window2] move workspace 2
57 $pid = launch_with_config($config);
59 my $window1 = open_window(
60 wm_class => '__i3-test-window1',
65 my $window2 = open_window(
66 wm_class => '__i3-test-window2',
73 exit_gracefully($pid);