]> git.sur5r.net Git - i3/i3/blobdiff - testcases/t/294-update-ewmh-atoms.t
Call all ewmh_update_* functions together when necessary
[i3/i3] / testcases / t / 294-update-ewmh-atoms.t
index 047cc1197360f11d42c7b6c7a46ebb4fb2741a44..f13b1764518540c93ae8f76fda1f0f4087f5dfde 100644 (file)
@@ -101,11 +101,19 @@ is_deeply(\@actual_names, \@expected_names);
 # Kill first window to close a workspace.
 cmd '[id="' . $second->id . '"] kill';
 
-is(get_current_desktop, 2, '_NET_CURRENT_DESKTOP should be updated');
+is(get_current_desktop, 1, '_NET_CURRENT_DESKTOP should be updated');
 is(get_num_of_desktops, 2, '_NET_NUMBER_OF_DESKTOPS should be updated');
 my @actual_names = get_desktop_names;
 my @expected_names = ('0', '2');
 is_deeply(\@actual_names, \@expected_names, '_NET_DESKTOP_NAMES should be updated');
 
+# Rename workspace to reorder them.
+cmd 'rename workspace 0 to 5';
+
+is(get_current_desktop, 0, '_NET_CURRENT_DESKTOP should be updated');
+is(get_num_of_desktops, 2, '_NET_NUMBER_OF_DESKTOPS should remain the same');
+my @actual_names = get_desktop_names;
+my @expected_names = ('2', '5');
+is_deeply(\@actual_names, \@expected_names, '_NET_DESKTOP_NAMES should be updated');
 
 done_testing;