aboutsummaryrefslogtreecommitdiff
path: root/testcases
diff options
context:
space:
mode:
authorrsgowman <richard.gowman@gmail.com>2024-02-06 14:28:20 -0500
committerGitHub <noreply@github.com>2024-02-06 20:28:20 +0100
commit6a530de22049d7ce8575d1fdd393654260a25234 (patch)
tree6e1184fad02a2cc3149abd3e5f2eba57f89ee867 /testcases
parent063916718505162b5ebe22268e413787cba32642 (diff)
downloadi3-6a530de22049d7ce8575d1fdd393654260a25234.tar.gz
i3-6a530de22049d7ce8575d1fdd393654260a25234.zip
Create new workspaces to the right of existing ones with the same number
i.e. creating workspaces named "1", "2:a", "2:b", "3" should result in that same order rather than "1", "2:b", "2:a", "3".
Diffstat (limited to 'testcases')
-rw-r--r--testcases/t/503-workspace.t14
-rw-r--r--testcases/t/528-workspace-next-prev-reversed.t15
-rw-r--r--testcases/t/535-workspace-next-prev.t15
3 files changed, 13 insertions, 31 deletions
diff --git a/testcases/t/503-workspace.t b/testcases/t/503-workspace.t
index 8a4aab9f..983c25a2 100644
--- a/testcases/t/503-workspace.t
+++ b/testcases/t/503-workspace.t
@@ -54,16 +54,12 @@ cmd 'workspace 5';
# ensure workspace 5 stays open
open_window;
-# numbered w/ name workspaces must be created in reverse order compared to
-# other workspace types (because a new numbered w/ name workspace is prepended
-# to the list of similarly numbered workspaces).
-
-cmd 'workspace 6:b';
-# ensure workspace 5 stays open
+cmd 'workspace 6:a';
+# ensure workspace 6:a stays open
open_window;
-cmd 'workspace 6:a';
-# ensure workspace 5 stays open
+cmd 'workspace 6:b';
+# ensure workspace 6:b stays open
open_window;
################################################################################
@@ -101,7 +97,7 @@ cmd 'workspace next';
# later in time and mess up our subsequent tests.
sync_with_i3;
-is(focused_ws, '6:b', 'workspace 6:b focused');
+is(focused_ws, '6:b', 'workspace 6:a focused');
cmd 'workspace next';
# We need to sync after changing focus to a different output to wait for the
# EnterNotify to be processed, otherwise it will be processed at some point
diff --git a/testcases/t/528-workspace-next-prev-reversed.t b/testcases/t/528-workspace-next-prev-reversed.t
index f5e11466..bf592bf3 100644
--- a/testcases/t/528-workspace-next-prev-reversed.t
+++ b/testcases/t/528-workspace-next-prev-reversed.t
@@ -68,11 +68,8 @@ cmd 'workspace D'; open_window;
cmd 'workspace 4'; open_window;
cmd 'workspace 5'; open_window;
cmd 'workspace E'; open_window;
-# numbered w/ name workspaces must be created in reverse order compared to
-# other workspace types (because a new numbered w/ name workspace is prepended
-# to the list of similarly numbered workspaces).
-cmd 'workspace 8:e'; open_window;
cmd 'workspace 8:d'; open_window;
+cmd 'workspace 8:e'; open_window;
cmd 'focus output right';
cmd 'workspace 1'; open_window;
@@ -83,19 +80,15 @@ cmd 'workspace F'; open_window;
cmd 'workspace 6'; open_window;
cmd 'workspace C'; open_window;
cmd 'workspace 7'; open_window;
-# numbered w/ name workspaces must be created in reverse order compared to
-# other workspace types (because a new numbered w/ name workspace is prepended
-# to the list of similarly numbered workspaces).
-cmd 'workspace 8:c'; open_window;
-cmd 'workspace 8:b'; open_window;
cmd 'workspace 8:a'; open_window;
+cmd 'workspace 8:b'; open_window;
+cmd 'workspace 8:c'; open_window;
################################################################################
# Use workspace next and verify the correct order.
# numbered -> numerical sort
# numbered w/ names -> numerical sort. Workspaces with the same number but
-# different names sort by output, followed by reverse creation time on each
-# output.
+# different names sort by output, followed by creation time on each output.
# named -> sort by creation time
################################################################################
cmd 'workspace 1';
diff --git a/testcases/t/535-workspace-next-prev.t b/testcases/t/535-workspace-next-prev.t
index 8510370c..e7c48508 100644
--- a/testcases/t/535-workspace-next-prev.t
+++ b/testcases/t/535-workspace-next-prev.t
@@ -68,11 +68,8 @@ cmd 'workspace D'; open_window;
cmd 'workspace 4'; open_window;
cmd 'workspace 5'; open_window;
cmd 'workspace E'; open_window;
-# numbered w/ name workspaces must be created in reverse order compared to
-# other workspace types (because a new numbered w/ name workspace is prepended
-# to the list of similarly numbered workspaces).
-cmd 'workspace 8:e'; open_window;
cmd 'workspace 8:d'; open_window;
+cmd 'workspace 8:e'; open_window;
cmd 'focus output left';
cmd 'workspace 1'; open_window;
@@ -83,19 +80,15 @@ cmd 'workspace F'; open_window;
cmd 'workspace 6'; open_window;
cmd 'workspace C'; open_window;
cmd 'workspace 7'; open_window;
-# numbered w/ name workspaces must be created in reverse order compared to
-# other workspace types (because a new numbered w/ name workspace is prepended
-# to the list of similarly numbered workspaces).
-cmd 'workspace 8:c'; open_window;
-cmd 'workspace 8:b'; open_window;
cmd 'workspace 8:a'; open_window;
+cmd 'workspace 8:b'; open_window;
+cmd 'workspace 8:c'; open_window;
################################################################################
# Use workspace next and verify the correct order.
# numbered -> numerical sort
# numbered w/ names -> numerical sort. Workspaces with the same number but
-# different names sort by output, followed by reverse creation time on each
-# output.
+# different names sort by output, followed by creation time on each output.
# named -> sort by creation time
################################################################################
cmd 'workspace 1';