Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions apps/vscode/src/test/examples/hello.lua
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
print("Hello World")
14 changes: 14 additions & 0 deletions apps/vscode/src/test/quartoDoc.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,20 @@ suite("Quarto basics", function () {
roundtripSnapshotTest('capsule-leak.qmd');

roundtripSnapshotTest('attr-equals.qmd');

// a test to prevent situations like https://github.com/quarto-dev/quarto/issues/845
test("Can open a non-qmd file normally", async function () {
const { editor, doc } = await openAndShowTextDocument("hello.lua");

editor.edit((editBuilder) => {
editBuilder.insert(new vscode.Position(0, 0), 'print("hiyo")\n');
});
doc.save();

await wait(1700); // approximate time to open visual editor, just in case

assert.equal(vscode.window.activeTextEditor, editor, 'quarto extension interferes with other files opened in VSCode!');
});
});

/**
Expand Down