From 82b73c20c913b532ef191eb28570037676734acd Mon Sep 17 00:00:00 2001 From: Michael Stapelberg Date: Wed, 22 Aug 2012 17:57:58 +0200 Subject: [PATCH] testcase for the previous commit --- testcases/t/176-workspace-baf.t | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/testcases/t/176-workspace-baf.t b/testcases/t/176-workspace-baf.t index 80b2d471..80644563 100644 --- a/testcases/t/176-workspace-baf.t +++ b/testcases/t/176-workspace-baf.t @@ -66,12 +66,31 @@ ok(get_ws($second_ws)->{focused}, 'second workspace focused'); cmd 'workspace number 5'; ok(get_ws('5')->{focused}, 'workspace 5 focused'); +# ensure it stays open +cmd 'open'; cmd 'workspace number 6'; ok(get_ws('6')->{focused}, 'workspace 6 focused'); +# ensure it stays open +cmd 'open'; cmd 'workspace number 6'; -ok(get_ws('5')->{focused}, 'workspace 5 focused again'); +is(focused_ws, '5', 'workspace 5 focused again'); + +################################################################################ +# Rename the workspaces and see if workspace number still works with BAF. +################################################################################ + +cmd 'rename workspace 5 to 5: foo'; +cmd 'rename workspace 6 to 6: baz'; + +is(focused_ws, '5: foo', 'workspace 5 still focused'); + +cmd 'workspace number 6'; +is(focused_ws, '6: baz', 'workspace 6 now focused'); + +cmd 'workspace number 6'; +is(focused_ws, '5: foo', 'workspace 5 focused again'); exit_gracefully($pid);