From: Michael Stapelberg Date: Wed, 22 Aug 2012 15:16:18 +0000 (+0200) Subject: testcase for the previous commit X-Git-Tag: 4.3~65 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=7cadc40846417bbebbf929c91f59710a60164510;p=i3%2Fi3 testcase for the previous commit --- diff --git a/testcases/t/132-move-workspace.t b/testcases/t/132-move-workspace.t index 79753cd7..0f1cbcc1 100644 --- a/testcases/t/132-move-workspace.t +++ b/testcases/t/132-move-workspace.t @@ -141,4 +141,26 @@ $ws = get_ws($tmp2); is(@{$ws->{nodes}}, 0, 'no nodes on workspace'); is(@{$ws->{floating_nodes}}, 1, 'one floating node on workspace'); +################################################################################ +# Check that 'move workspace number' works correctly. +################################################################################ + +$tmp = get_unused_workspace(); +cmd 'open'; + +cmd 'workspace 16'; +cmd 'open'; +is(@{get_ws('16')->{nodes}}, 1, 'one node on ws 16'); + +cmd "workspace $tmp"; +cmd 'open'; +cmd 'move workspace number 16'; +is(@{get_ws('16')->{nodes}}, 2, 'two nodes on ws 16'); + +ok(!workspace_exists('17'), 'workspace 17 does not exist yet'); +cmd 'open'; +cmd 'move workspace number 17'; +ok(workspace_exists('17'), 'workspace 17 created by moving'); +is(@{get_ws('17')->{nodes}}, 1, 'one node on ws 16'); + done_testing;