From 7cadc40846417bbebbf929c91f59710a60164510 Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 22 Aug 2012 17:16:18 +0200 Subject: [PATCH] testcase for the previous commit --- testcases/t/132-move-workspace.t | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) 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; -- 2.39.5