Path: blob/main/tests/smoke/yaml/yaml-cr-line-endings.test.ts
6569 views
/*1* yaml-cr-line-endings.test.ts2*3* Test YAML validation with CR-only line endings (old Mac format)4* See: https://github.com/quarto-dev/quarto-cli/issues/139985*6* Copyright (C) 2025 Posit Software, PBC7*/89import { testRender } from "../render/render.ts";10import { noErrorsOrWarnings } from "../../verify.ts";11import { join } from "../../../src/deno_ral/path.ts";1213// Create test file with CR-only line endings programmatically14const dir = Deno.makeTempDirSync({ prefix: "quarto-cr-test-" });15const crContent = "---\rtitle: \"CR Test\"\rauthor: \"Test Author\"\r---\r\rContent here.\r";16const inputFile = join(dir, "cr-only.qmd");17Deno.writeFileSync(inputFile, new TextEncoder().encode(crContent));1819testRender(inputFile, "html", false, [noErrorsOrWarnings], {20teardown: async () => {21Deno.removeSync(dir, { recursive: true });22},23});242526