Skip to content

Commit

Permalink
Update Talon grammar tests
Browse files Browse the repository at this point in the history
  • Loading branch information
AndreasArvidsson committed Feb 1, 2025
1 parent 415945a commit afdea94
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 31 deletions.
4 changes: 0 additions & 4 deletions cursorless-talon-dev/src/cursorless_test.talon
Original file line number Diff line number Diff line change
Expand Up @@ -25,12 +25,8 @@ test api insert snippet:
user.cursorless_insert_snippet("Hello, $foo! My name is $bar!")
test api insert snippet <user.cursorless_destination> :
user.cursorless_insert_snippet("Hello, $foo! My name is $bar!", cursorless_destination, "statement")
test api insert snippet by name:
user.cursorless_insert_snippet_by_name("functionDeclaration")
test api wrap with snippet <user.cursorless_target>:
user.cursorless_wrap_with_snippet("Hello, $foo! My name is $bar!", cursorless_target, "foo", "statement")
test api wrap with snippet by name <user.cursorless_target>:
user.cursorless_wrap_with_snippet_by_name("functionDeclaration", "body", cursorless_target)
test api extract decorated marks <user.cursorless_target>:
user.private_cursorless_test_extract_decorated_marks(cursorless_target)
test api alternate highlight nothing:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,13 @@ const verticalRangeAction: ActionDescriptor = {
},
},
snippetDescription: {
body: "```\n$0\n```",
type: "custom",
type: "list",
snippets: [
{
type: "custom",
body: "```\n$0\n```",
},
],
},
};

Expand Down
25 changes: 0 additions & 25 deletions packages/cursorless-engine/src/test/fixtures/talonApi.fixture.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,14 +60,6 @@ const insertSnippetWithScopeAction: ActionDescriptor = {
scopeTypes: [{ type: "statement" }],
},
};
const insertSnippetByNameAction: ActionDescriptor = {
name: "insertSnippet",
destination: { type: "implicit" },
snippetDescription: {
type: "named",
name: "functionDeclaration",
},
};
const wrapWithSnippetAction: ActionDescriptor = {
name: "wrapWithSnippet",
target: {
Expand All @@ -81,18 +73,6 @@ const wrapWithSnippetAction: ActionDescriptor = {
scopeType: { type: "statement" },
},
};
const wrapWithSnippetByNameAction: ActionDescriptor = {
name: "wrapWithSnippet",
target: {
type: "primitive",
mark: { type: "cursor" },
},
snippetDescription: {
type: "named",
name: "functionDeclaration",
variableName: "body",
},
};
const alternateHighlightAirAndBatAction: ActionDescriptor = {
name: "highlight",
target: {
Expand Down Expand Up @@ -212,12 +192,7 @@ export const talonApiFixture = [
"test api insert snippet after air",
insertSnippetWithScopeAction,
),
spokenFormTest("test api insert snippet by name", insertSnippetByNameAction),
spokenFormTest("test api wrap with snippet this", wrapWithSnippetAction),
spokenFormTest(
"test api wrap with snippet by name this",
wrapWithSnippetByNameAction,
),
spokenFormTest(
"test api get text air",
getTextAction({ showDecorations: true, ensureSingleTarget: true }),
Expand Down

0 comments on commit afdea94

Please sign in to comment.