Merge pull request #2808 from hwangcc23/fix-2802
Fix 'rename workspace to tosomething'
This commit is contained in:
commit
78adcdab7f
|
@ -274,24 +274,28 @@ state RENAME:
|
||||||
-> RENAME_WORKSPACE
|
-> RENAME_WORKSPACE
|
||||||
|
|
||||||
state RENAME_WORKSPACE:
|
state RENAME_WORKSPACE:
|
||||||
old_name = 'to'
|
'to'
|
||||||
-> RENAME_WORKSPACE_LIKELY_TO
|
-> RENAME_WORKSPACE_LIKELY_TO
|
||||||
old_name = word
|
old_name = word
|
||||||
-> RENAME_WORKSPACE_TO
|
-> RENAME_WORKSPACE_TO
|
||||||
|
|
||||||
state RENAME_WORKSPACE_LIKELY_TO:
|
state RENAME_WORKSPACE_LIKELY_TO:
|
||||||
'to '
|
'to '
|
||||||
-> RENAME_WORKSPACE_NEW_NAME
|
-> RENAME_WORKSPACE_LIKELY_TO_NEW_NAME
|
||||||
new_name = word
|
new_name = word
|
||||||
-> call cmd_rename_workspace(NULL, $new_name)
|
-> call cmd_rename_workspace(NULL, $new_name)
|
||||||
|
|
||||||
state RENAME_WORKSPACE_TO:
|
state RENAME_WORKSPACE_LIKELY_TO_NEW_NAME:
|
||||||
'to'
|
new_name = string
|
||||||
-> RENAME_WORKSPACE_NEW_NAME
|
-> call cmd_rename_workspace("to", $new_name)
|
||||||
|
|
||||||
state RENAME_WORKSPACE_NEW_NAME:
|
|
||||||
end
|
end
|
||||||
-> call cmd_rename_workspace(NULL, "to")
|
-> call cmd_rename_workspace(NULL, "to")
|
||||||
|
|
||||||
|
state RENAME_WORKSPACE_TO:
|
||||||
|
'to'
|
||||||
|
-> RENAME_WORKSPACE_TO_NEW_NAME
|
||||||
|
|
||||||
|
state RENAME_WORKSPACE_TO_NEW_NAME:
|
||||||
new_name = string
|
new_name = string
|
||||||
-> call cmd_rename_workspace($old_name, $new_name)
|
-> call cmd_rename_workspace($old_name, $new_name)
|
||||||
|
|
||||||
|
|
|
@ -279,6 +279,12 @@ is(focused_ws(), 'bla', 'now on workspace bla');
|
||||||
cmd 'rename workspace to to';
|
cmd 'rename workspace to to';
|
||||||
ok(!workspace_exists('bla'), 'workspace bla does not exist anymore');
|
ok(!workspace_exists('bla'), 'workspace bla does not exist anymore');
|
||||||
is(focused_ws(), 'to', 'now on workspace to');
|
is(focused_ws(), 'to', 'now on workspace to');
|
||||||
|
cmd 'rename workspace to bla';
|
||||||
|
ok(!workspace_exists('to'), 'workspace to does not exist anymore');
|
||||||
|
is(focused_ws(), 'bla', 'now on workspace bla');
|
||||||
|
cmd 'rename workspace to tosomething';
|
||||||
|
ok(!workspace_exists('bla'), 'workspace bla does not exist anymore');
|
||||||
|
is(focused_ws(), 'tosomething', 'now on workspace tosomething');
|
||||||
|
|
||||||
# 6: already existing workspace
|
# 6: already existing workspace
|
||||||
my $result = cmd 'rename workspace qux to 11: bar';
|
my $result = cmd 'rename workspace qux to 11: bar';
|
||||||
|
|
Loading…
Reference in New Issue