From 36e20a93a09ecfe9ae30576afa01aaa8c1ce7148 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Thu, 27 Jan 2011 23:25:36 +0100 Subject: [PATCH] add a regression test for the floating move thing --- testcases/t/47-regress-floatingmove.t | 39 +++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 testcases/t/47-regress-floatingmove.t diff --git a/testcases/t/47-regress-floatingmove.t b/testcases/t/47-regress-floatingmove.t new file mode 100644 index 00000000..ae6fe963 --- /dev/null +++ b/testcases/t/47-regress-floatingmove.t @@ -0,0 +1,39 @@ +#!perl +# vim:ts=4:sw=4:expandtab +# +# Regression test for moving a con outside of a floating con when there are no +# tiling cons on a workspace +# +use X11::XCB qw(:all); +use Time::HiRes qw(sleep); +use i3test tests => 2; + +BEGIN { + use_ok('X11::XCB::Window'); +} + +my $x = X11::XCB::Connection->new; + +my $tmp = get_unused_workspace; +cmd "workspace $tmp"; + +my $left = open_standard_window($x); +sleep 0.25; +my $mid = open_standard_window($x); +sleep 0.25; + +# go to workspace level +cmd 'level up'; +sleep 0.25; + +# make it floating +cmd 'mode toggle'; +sleep 0.25; + +# move the con outside the floating con +cmd 'move before v'; +sleep 0.25; + +my $tree = i3('/tmp/nestedcons')->get_tree->recv; +my @nodes = @{$tree->{nodes}}; +ok(@nodes > 0, 'i3 still lives');