add another test for https://github.com/microsoft/vscode/issues/96545
This commit is contained in:
parent
c8d123ded5
commit
5e4c53cffc
1 changed files with 12 additions and 2 deletions
|
@ -561,8 +561,7 @@ suite('SnippetSession', function () {
|
||||||
assertSelections(editor, new Selection(2, 1, 2, 1));
|
assertSelections(editor, new Selection(2, 1, 2, 1));
|
||||||
});
|
});
|
||||||
|
|
||||||
// Refer to issue #96545.
|
test('Snippet tab stop selection issue #96545, snippets, transform adjacent to previous placeholder', function () {
|
||||||
test('snippets, transform adjacent to previous placeholder', function () {
|
|
||||||
editor.getModel()!.setValue('');
|
editor.getModel()!.setValue('');
|
||||||
editor.setSelection(new Selection(1, 1, 1, 1));
|
editor.setSelection(new Selection(1, 1, 1, 1));
|
||||||
const session = new SnippetSession(editor, '${1:{}${2:fff}${1/{/}/}');
|
const session = new SnippetSession(editor, '${1:{}${2:fff}${1/{/}/}');
|
||||||
|
@ -581,6 +580,17 @@ suite('SnippetSession', function () {
|
||||||
assertSelections(editor, new Selection(1, 6, 1, 6));
|
assertSelections(editor, new Selection(1, 6, 1, 6));
|
||||||
});
|
});
|
||||||
|
|
||||||
|
test('Snippet tab stop selection issue #96545', function () {
|
||||||
|
editor.getModel().setValue('');
|
||||||
|
const session = new SnippetSession(editor, '${1:{}${2:fff}${1/[\\{]/}/}$0');
|
||||||
|
session.insert();
|
||||||
|
assert.equal(editor.getModel().getValue(), '{fff{');
|
||||||
|
|
||||||
|
assertSelections(editor, new Selection(1, 1, 1, 2), new Selection(1, 5, 1, 6));
|
||||||
|
session.next();
|
||||||
|
assertSelections(editor, new Selection(1, 2, 1, 5));
|
||||||
|
});
|
||||||
|
|
||||||
test('Snippet placeholder index incorrect after using 2+ snippets in a row that each end with a placeholder, #30769', function () {
|
test('Snippet placeholder index incorrect after using 2+ snippets in a row that each end with a placeholder, #30769', function () {
|
||||||
editor.getModel()!.setValue('');
|
editor.getModel()!.setValue('');
|
||||||
editor.setSelection(new Selection(1, 1, 1, 1));
|
editor.setSelection(new Selection(1, 1, 1, 1));
|
||||||
|
|
Loading…
Reference in a new issue