2 # vim:ts=4:sw=4:expandtab
4 # Please read the following documents before working on tests:
5 # • http://build.i3wm.org/docs/testsuite.html
8 # • http://build.i3wm.org/docs/lib-i3test.html
9 # (alternatively: perldoc ./testcases/lib/i3test.pm)
11 # • http://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 internal workspaces (those whose name starts with __) cannot be
18 # used in all commands that deal with workspaces.
20 # Bug still in: 4.7.2-154-g144e3fb
21 use i3test i3_autostart => 0;
23 sub internal_workspaces {
24 scalar grep { /^__/ } @{get_workspace_names()}
29 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
32 my $pid = launch_with_config($config);
34 is(internal_workspaces(), 0, 'No internal workspaces');
36 cmd 'workspace __foo';
37 is(internal_workspaces(), 0, 'No internal workspaces');
39 cmd 'move to workspace __foo';
40 is(internal_workspaces(), 0, 'No internal workspaces');
42 cmd 'rename workspace to __foo';
43 is(internal_workspaces(), 0, 'No internal workspaces');
45 exit_gracefully($pid);
47 ################################################################################
48 # Verify that new workspace names starting with __ are ignored.
49 ################################################################################
53 font -misc-fixed-medium-r-normal--13-120-75-75-C-70-iso10646-1
55 bindsym Mod1+1 workspace __foo
56 bindsym Mod1+2 workspace bar
59 $pid = launch_with_config($config);
61 is_deeply(get_workspace_names(), [ 'bar' ], 'New workspace called bar, not __foo');
63 exit_gracefully($pid);