Skip to content

Commit 5f8bf78

Browse files
committed
regression test
1 parent a6c6d5c commit 5f8bf78

File tree

3 files changed

+53
-0
lines changed

3 files changed

+53
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
project:
2+
title: "cleanup-bug"
3+
4+
5+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
title: "cleanup-bug"
3+
engine: jupyter
4+
---
5+
6+
## Quarto
7+
8+
Quarto enables you to weave together content and executable code into a finished document. To learn more about Quarto see <https://quarto.org>.
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
/*
2+
* inspect-cleanup.test.ts
3+
*
4+
* Copyright (C) 2020-2025 Posit Software, PBC
5+
*
6+
*/
7+
8+
import { existsSync } from "../../../src/deno_ral/fs.ts";
9+
import { } from "../../../src/project/types.ts";
10+
import {
11+
ExecuteOutput,
12+
testQuartoCmd,
13+
} from "../../test.ts";
14+
import { assert } from "testing/asserts";
15+
16+
(() => {
17+
const input = "docs/inspect/cleanup-issue-12336/cleanup-bug.qmd";
18+
const output = "docs/inspect/cleanup-issue-12336/cleanup-bug.json";
19+
testQuartoCmd(
20+
"inspect",
21+
[input, output],
22+
[
23+
{
24+
name: "inspect-code-cells",
25+
verify: async (outputs: ExecuteOutput[]) => {
26+
assert(existsSync(output));
27+
const json = JSON.parse(Deno.readTextFileSync(output));
28+
assert(json.fileInformation["docs/inspect/cleanup-issue-12336/cleanup-bug.qmd"].metadata.engine === "jupyter");
29+
assert(!existsSync("docs/inspect/cleanup-issue-12336/cleanup-bug.quarto_ipynb"));
30+
}
31+
}
32+
],
33+
{
34+
teardown: async () => {
35+
if (existsSync(output)) {
36+
Deno.removeSync(output);
37+
}
38+
}
39+
},
40+
)})();

0 commit comments

Comments
 (0)