Skip to content

Commit c6bd8a1

Browse files
committed
test - beamer produces .pdf not a .tex file as output
1 parent 81830ec commit c6bd8a1

File tree

4 files changed

+9
-6
lines changed

4 files changed

+9
-6
lines changed

tests/docs/smoke-all/2023/09/22/beamer-numsec.qmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ title: Number Sections
33
format:
44
beamer:
55
number-sections: true
6-
output-ext: tex
6+
keep-tex: true
77
_quarto:
88
tests:
99
beamer:
10-
ensureFileRegexMatches:
10+
ensureLatexFileRegexMatches:
1111
- ['\{1 Section\}', '\{1[.]1 Subsection\}']
1212
- []
1313
---

tests/docs/smoke-all/conditional-content/when-format.qmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -74,7 +74,7 @@ _quarto:
7474
- ['Only visible in IPYNB']
7575
- ['Only visible in (?!IPYNB)']
7676
beamer:
77-
ensureFileRegexMatches:
77+
ensureLatexFileRegexMatches:
7878
- ['Only visible in BEAMER', 'Only visible in LATEX', 'Only visible in PDF']
7979
- ['Only visible in (?!BEAMER|LATEX|PDF)']
8080
---

tests/utils.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,9 +109,12 @@ export function outputForInput(
109109
outputExt = ext
110110
} else {
111111
outputExt = baseFormat || "html";
112-
if (baseFormat === "latex" || baseFormat == "context" || baseFormat == "beamer") {
112+
if (baseFormat === "latex" || baseFormat == "context") {
113113
outputExt = "tex";
114114
}
115+
if (baseFormat === "beamer") {
116+
outputExt = "pdf";
117+
}
115118
if (baseFormat === "revealjs") {
116119
outputExt = "html";
117120
}

tests/verify.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { readYamlFromString } from "../src/core/yaml.ts";
1717
import { ExecuteOutput, Verify } from "./test.ts";
1818
import { outputForInput } from "./utils.ts";
1919
import { unzip } from "../src/core/zip.ts";
20-
import { dirAndStem, which } from "../src/core/path.ts";
20+
import { dirAndStem, safeRemoveSync, which } from "../src/core/path.ts";
2121
import { isWindows } from "../src/deno_ral/platform.ts";
2222
import { execProcess } from "../src/core/process.ts";
2323
import { canonicalizeSnapshot, checkSnapshot } from "./verify-snapshot.ts";
@@ -488,7 +488,7 @@ export const verifyKeepFileRegexMatches = (
488488
try {
489489
await regexChecker(file, matches, noMatches);
490490
} finally {
491-
await Deno.remove(file);
491+
await safeRemoveSync(file);
492492
}
493493
}
494494
return verifyFileRegexMatches(keptFileChecker, `Inspecting intermediate ${keptFile} for Regex matches`)(keptFile, matchesUntyped, noMatchesUntyped);

0 commit comments

Comments
 (0)