GREP_FIRST(check_dest, output_get_content(output),
!strcasecmp(child->name, new_name));
- if (check_dest != NULL) {
+ /* If check_dest == workspace, the user might be changing the case of the
+ * workspace, or it might just be a no-op. */
+ if (check_dest != NULL && check_dest != workspace) {
yerror("New workspace \"%s\" already exists", new_name);
return;
}
$result = cmd 'rename workspace notexistant to bleh';
ok(!$result->[0]->{success}, 'renaming workspace which does not exist failed');
+# 8: change case
+ok(!workspace_exists('11: BAR'), 'workspace 11: BAR does not exist yet');
+$result = cmd 'rename workspace "11: bar" to "11: BAR"';
+ok($result->[0]->{success}, 'renaming workspace from 11: bar to 11: BAR worked');
+ok(workspace_exists('11: BAR'), 'workspace 11: BAR now exists');
done_testing;