X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F522-rename-assigned-workspace.t;h=824f4a062ddba6be888842425c9fe69ed6e1f280;hb=refs%2Fpull%2F3254%2Fhead;hp=f6319729873209ed2d765ccf044c195f4b254a92;hpb=d525eb80aefcd596c5c40750eb9fa3570e5c55ed;p=i3%2Fi3 diff --git a/testcases/t/522-rename-assigned-workspace.t b/testcases/t/522-rename-assigned-workspace.t index f6319729..824f4a06 100644 --- a/testcases/t/522-rename-assigned-workspace.t +++ b/testcases/t/522-rename-assigned-workspace.t @@ -29,6 +29,8 @@ workspace 2 output fake-1 workspace 3:foo output fake-1 workspace baz output fake-1 workspace 5 output left +workspace 6 output doesnotexist fake-0 +workspace 7 output fake-1 fake-0 EOT ########################################################################## @@ -91,4 +93,24 @@ cmd 'rename workspace 5 to 2'; is(get_output_for_workspace('2'), 'fake-1', 'Renaming a workspace so that it moves to the focused output which contains only an empty workspace should replace the empty workspace'); +########################################################################## +# Renaming a workspace with multiple assignments, where the first output +# doesn't exist. +########################################################################## + +cmd 'focus output fake-1'; +cmd 'rename workspace to 6'; +is(get_output_for_workspace('6'), 'fake-0', + 'Renaming the workspace while first target output doesn\'t exist moves it to the second assigned output'); + +########################################################################## +# Renaming a workspace with multiple assignments, where both outputs exist +# moves it to the first output. +########################################################################## + +cmd 'focus output fake-0'; +cmd 'rename workspace to 7'; +is(get_output_for_workspace('7'), 'fake-1', + 'Renaming a workspace with multiple assignments, where both outputs exist moves it to the first output.'); + done_testing;