X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=testcases%2Ft%2F175-startup-notification.t;h=cd6f3950b3642148699f8b46fd7e1291ab83e9b8;hb=HEAD;hp=ee285ff74a6087e0108f9f9dca177f1b723352b9;hpb=a5c9b0dedbe13a0099ec7fa466a548cc987e6613;p=i3%2Fi3 diff --git a/testcases/t/175-startup-notification.t b/testcases/t/175-startup-notification.t index ee285ff7..cd6f3950 100644 --- a/testcases/t/175-startup-notification.t +++ b/testcases/t/175-startup-notification.t @@ -2,13 +2,13 @@ # vim:ts=4:sw=4:expandtab # # Please read the following documents before working on tests: -# • http://build.i3wm.org/docs/testsuite.html +# • https://build.i3wm.org/docs/testsuite.html # (or docs/testsuite) # -# • http://build.i3wm.org/docs/lib-i3test.html +# • https://build.i3wm.org/docs/lib-i3test.html # (alternatively: perldoc ./testcases/lib/i3test.pm) # -# • http://build.i3wm.org/docs/ipc.html +# • https://build.i3wm.org/docs/ipc.html # (or docs/ipc) # # • http://onyxneon.com/books/modern_perl/modern_perl_a4.pdf @@ -84,7 +84,7 @@ is_num_children($first_ws, 0, 'no containers on this workspace yet'); # echo its $DESKTOP_STARTUP_ID. We (blockingly) read the variable into # $startup_id in the testcase. my $tmp = tmpnam(); -mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp"; +mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp: $!"; cmd qq|exec echo \$DESKTOP_STARTUP_ID >$tmp|; @@ -142,14 +142,24 @@ is_num_children($first_ws, 2, 'two containers on the first workspace'); complete_startup(); sync_with_i3; +# even when renaming the workspace, windows should end up on the correct one +cmd "rename workspace $first_ws to temp"; + # Startup has completed but the 30-second deletion time hasn't elapsed, # so this window should still go on the leader's initial workspace. $win = open_window({ dont_map => 1, client_leader => $leader }); $win->map; sync_with_i3; +cmd "rename workspace temp to $first_ws"; + is_num_children($first_ws, 3, 'three containers on the first workspace'); +# empty 'from' workspaces should not crash the renaming of startup sequences +cmd "workspace $first_ws"; +cmd "rename workspace to temp"; +cmd "rename workspace to $first_ws"; + # Switch to the first workspace and move the focused window to the # second workspace. cmd "workspace $first_ws"; @@ -182,7 +192,7 @@ is_num_children($third_ws, 2, 'two containers on the third workspace'); # environment variable. ###################################################################### -mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp"; +mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp: $!"; cmd qq|exec --no-startup-id echo \$DESKTOP_STARTUP_ID >$tmp|; @@ -198,7 +208,7 @@ is($startup_id, '', 'startup_id empty'); # 4) same thing, but with double quotes in exec ###################################################################### -mkfifo($tmp, 0600) or die "Could not create FIFO in $tmp"; +mkfifo($tmp, 0600) or BAIL_OUT "Could not create FIFO in $tmp: $!"; cmd qq|exec --no-startup-id "echo \$DESKTOP_STARTUP_ID >$tmp"|;