]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/132-move-workspace.t
Add a new command 'move to workspace current'
[i3/i3] / testcases / t / 132-move-workspace.t
index 3f00428c035739cabf9f6f21a04b68cb226bb592..79753cd7133241a7375b831e075a12ef373d212b 100644 (file)
@@ -99,6 +99,26 @@ cmd 'move workspace prev';
 ok(@{get_ws_content($tmp)} == 3, 'three containers on first ws');
 ok(@{get_ws_content($tmp2)} == 0, 'no containers on second ws');
 
+###################################################################
+# check if 'move workspace current' works
+###################################################################
+
+$tmp = get_unused_workspace();
+$tmp2 = get_unused_workspace();
+
+cmd "workspace $tmp";
+$first = open_window(name => 'win-name');
+ok(@{get_ws_content($tmp)} == 1, 'one container on first ws');
+
+cmd "workspace $tmp2";
+ok(@{get_ws_content($tmp2)} == 0, 'no containers yet');
+
+cmd qq|[title="win-name"] move workspace $tmp2|;
+ok(@{get_ws_content($tmp2)} == 1, 'one container on second ws');
+
+cmd qq|[title="win-name"] move workspace $tmp|;
+ok(@{get_ws_content($tmp2)} == 0, 'no containers on second ws');
+
 ###################################################################
 # check if floating cons are moved to new workspaces properly
 # (that is, if they are floating on the target ws, too)