debian
docs
i3-input
i3-msg
include
man
src
testcases
t
lib
00-load.t
01-tile.t
02-fullscreen.t
03-unmanaged.t
04-floating.t
05-ipc.t
06-focus.t
07-move.t
08-focus-stack.t
09-stacking.t
10-dock.t
11-goto.t
12-floating-resize.t
13-urgent.t
14-client-leader.t
15-ipc-workspaces.t
16-nestedcons.t
17-workspace.t
18-openkill.t
19-match.t
20-multiple-cmds.t
21-next-prev.t
22-split.t
24-move.t
26-regress-close.t
27-regress-floating-parent.t
28-open-order.t
29-focus-after-close.t
30-close-empty-split.t
31-stacking-order.t
32-move-workspace.t
33-size-hints.t
34-invalid-command.t
Makefile
tests
website
.gitignore
CMDMODE
DEPENDS
GOALS
LICENSE
Makefile
PACKAGE-MAINTAINER
README.tree
RELEASE-NOTES-3.a-bf1
RELEASE-NOTES-3.b
RELEASE-NOTES-3.c
RELEASE-NOTES-3.d
TODO
common.mk
dump-asy.pl
gtk-tree-watch.pl
i3-wsbar
i3.config
i3.desktop
i3.welcome
logo.svg
pseudo-doc.doxygen
44 lines
1.2 KiB
Perl
44 lines
1.2 KiB
Perl
#!perl
|
|
# vim:ts=4:sw=4:expandtab
|
|
#
|
|
# Tests whether opening an empty container and killing it again works
|
|
#
|
|
use List::Util qw(first);
|
|
use i3test tests => 6;
|
|
|
|
my $i3 = i3("/tmp/nestedcons");
|
|
|
|
my $tmp = get_unused_workspace();
|
|
$i3->command("workspace $tmp")->recv;
|
|
|
|
ok(@{get_ws_content($tmp)} == 0, 'no containers yet');
|
|
|
|
# Open a new container
|
|
$i3->command("open")->recv;
|
|
|
|
ok(@{get_ws_content($tmp)} == 1, 'container opened');
|
|
|
|
$i3->command("kill")->recv;
|
|
ok(@{get_ws_content($tmp)} == 0, 'container killed');
|
|
|
|
##############################################################
|
|
# open two containers and kill the one which is not focused
|
|
# by its ID to test if the parser correctly matches the window
|
|
##############################################################
|
|
|
|
$i3->command('open')->recv;
|
|
$i3->command('open')->recv;
|
|
ok(@{get_ws_content($tmp)} == 2, 'two containers opened');
|
|
|
|
my $content = get_ws_content($tmp);
|
|
my $not_focused = first { !$_->{focused} } @{$content};
|
|
my $id = $not_focused->{id};
|
|
|
|
$i3->command("[con_id=\"$id\"] kill")->recv;
|
|
|
|
$content = get_ws_content($tmp);
|
|
ok(@{$content} == 1, 'one container killed');
|
|
ok($content->[0]->{id} != $id, 'correct window killed');
|
|
|
|
diag( "Testing i3, Perl $], $^X" );
|