Skip to content

Commit afdea94

Browse files
Update Talon grammar tests
1 parent 415945a commit afdea94

File tree

3 files changed

+7
-31
lines changed

3 files changed

+7
-31
lines changed

cursorless-talon-dev/src/cursorless_test.talon

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,12 +25,8 @@ test api insert snippet:
2525
user.cursorless_insert_snippet("Hello, $foo! My name is $bar!")
2626
test api insert snippet <user.cursorless_destination> :
2727
user.cursorless_insert_snippet("Hello, $foo! My name is $bar!", cursorless_destination, "statement")
28-
test api insert snippet by name:
29-
user.cursorless_insert_snippet_by_name("functionDeclaration")
3028
test api wrap with snippet <user.cursorless_target>:
3129
user.cursorless_wrap_with_snippet("Hello, $foo! My name is $bar!", cursorless_target, "foo", "statement")
32-
test api wrap with snippet by name <user.cursorless_target>:
33-
user.cursorless_wrap_with_snippet_by_name("functionDeclaration", "body", cursorless_target)
3430
test api extract decorated marks <user.cursorless_target>:
3531
user.private_cursorless_test_extract_decorated_marks(cursorless_target)
3632
test api alternate highlight nothing:

packages/cursorless-engine/src/test/fixtures/communitySnippets.fixture.ts

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,13 @@ const verticalRangeAction: ActionDescriptor = {
1616
},
1717
},
1818
snippetDescription: {
19-
body: "```\n$0\n```",
20-
type: "custom",
19+
type: "list",
20+
snippets: [
21+
{
22+
type: "custom",
23+
body: "```\n$0\n```",
24+
},
25+
],
2126
},
2227
};
2328

packages/cursorless-engine/src/test/fixtures/talonApi.fixture.ts

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -60,14 +60,6 @@ const insertSnippetWithScopeAction: ActionDescriptor = {
6060
scopeTypes: [{ type: "statement" }],
6161
},
6262
};
63-
const insertSnippetByNameAction: ActionDescriptor = {
64-
name: "insertSnippet",
65-
destination: { type: "implicit" },
66-
snippetDescription: {
67-
type: "named",
68-
name: "functionDeclaration",
69-
},
70-
};
7163
const wrapWithSnippetAction: ActionDescriptor = {
7264
name: "wrapWithSnippet",
7365
target: {
@@ -81,18 +73,6 @@ const wrapWithSnippetAction: ActionDescriptor = {
8173
scopeType: { type: "statement" },
8274
},
8375
};
84-
const wrapWithSnippetByNameAction: ActionDescriptor = {
85-
name: "wrapWithSnippet",
86-
target: {
87-
type: "primitive",
88-
mark: { type: "cursor" },
89-
},
90-
snippetDescription: {
91-
type: "named",
92-
name: "functionDeclaration",
93-
variableName: "body",
94-
},
95-
};
9676
const alternateHighlightAirAndBatAction: ActionDescriptor = {
9777
name: "highlight",
9878
target: {
@@ -212,12 +192,7 @@ export const talonApiFixture = [
212192
"test api insert snippet after air",
213193
insertSnippetWithScopeAction,
214194
),
215-
spokenFormTest("test api insert snippet by name", insertSnippetByNameAction),
216195
spokenFormTest("test api wrap with snippet this", wrapWithSnippetAction),
217-
spokenFormTest(
218-
"test api wrap with snippet by name this",
219-
wrapWithSnippetByNameAction,
220-
),
221196
spokenFormTest(
222197
"test api get text air",
223198
getTextAction({ showDecorations: true, ensureSingleTarget: true }),

0 commit comments

Comments
 (0)