Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
quarto-dev
GitHub Repository: quarto-dev/quarto-cli
Path: blob/main/tests/smoke/render/render-pdf-standard-env.test.ts
12925 views
1
/*
2
* render-pdf-standard-env.test.ts
3
*
4
* Copyright (C) 2020-2022 Posit Software, PBC
5
*
6
* Tests that QUARTO_PDF_STANDARD environment variable is used as a fallback
7
* when no pdf-standard is set in the document YAML.
8
*/
9
10
import { docs, outputForInput } from "../../utils.ts";
11
import { ensureLatexFileRegexMatches } from "../../verify.ts";
12
import { testRender } from "./render.ts";
13
14
const input = docs("render/pdf-standard-env.qmd");
15
const output = outputForInput(input, "pdf");
16
17
// Test that QUARTO_PDF_STANDARD env var applies ua-2 even though
18
// the document has no pdf-standard in its YAML
19
testRender(input, "pdf", true, [
20
ensureLatexFileRegexMatches(
21
output.outputPath,
22
[/\\DocumentMetadata\{/, /pdfstandard=\{ua-2\}/, /tagging=on/],
23
[],
24
input,
25
),
26
], {
27
env: {
28
QUARTO_PDF_STANDARD: "ua-2",
29
},
30
});
31
32