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 # TODO: Description of this file.
19 # Bug still in: 4.10.3-270-g0fb784f
21 use File::Temp qw(tempfile);
24 my $ws = fresh_workspace;
26 my @content = @{get_ws_content($ws)};
27 is(@content, 0, 'no nodes on the new workspace yet');
29 my ($fh, $filename) = tempfile(UNLINK => 1);
32 // stacked split container with 1 children
34 "floating": "auto_off",
41 "current_border_width": 2,
42 "floating": "auto_off",
52 { "class": "^URxvt$" },
53 { "class": "^Gitk$" },
54 { "class": "^Git-gui$" }
62 my $reply = cmd "append_layout $filename";
67 @content = @{get_ws_content($ws)};
68 is(@content, 1, "one node on the workspace now");
70 my $should_swallow = open_window(wm_class => 'URxvt');
72 @content = @{get_ws_content($ws)};
73 is(@content, 1, "still one node on the workspace now");
74 my @nodes = @{$content[0]->{nodes}};
75 is($nodes[0]->{window}, $should_swallow->id, "swallowed window on top");
79 my $should_ignore = open_window(wm_class => 'Gitk');
81 @content = @{get_ws_content($ws)};
82 is(@content, 2, "two nodes on the workspace");