]> git.sur5r.net Git - i3/i3/commitdiff
add testcase for focus problem when toggling floating/tiling mode
authorMichael Stapelberg <michael@stapelberg.de>
Sun, 14 Nov 2010 20:43:31 +0000 (21:43 +0100)
committerMichael Stapelberg <michael@stapelberg.de>
Sun, 14 Nov 2010 20:43:31 +0000 (21:43 +0100)
Test 3 does not yet pass.

testcases/t/35-floating-focus.t [new file with mode: 0644]

diff --git a/testcases/t/35-floating-focus.t b/testcases/t/35-floating-focus.t
new file mode 100644 (file)
index 0000000..7efe247
--- /dev/null
@@ -0,0 +1,23 @@
+#!perl
+# vim:ts=4:sw=4:expandtab
+
+use i3test tests => 3;
+use Time::HiRes qw(sleep);
+
+my $i3 = i3("/tmp/nestedcons");
+
+my $tmp = get_unused_workspace();
+$i3->command("workspace $tmp")->recv;
+
+$i3->command("open")->recv;
+$i3->command("open")->recv;
+
+my @content = @{get_ws_content($tmp)};
+cmp_ok(@content, '==', 2, 'two containers opened');
+cmp_ok($content[1]->{focused}, '==', 1, 'Second container focused');
+
+$i3->command("mode floating")->recv;
+$i3->command("mode tiling")->recv;
+
+@content = @{get_ws_content($tmp)};
+cmp_ok($content[1]->{focused}, '==', 1, 'Second container still focused after mode toggle');