-
Notifications
You must be signed in to change notification settings - Fork 344
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #12151 from quarto-dev/fix/windows/yaml-validation
- Loading branch information
Showing
10 changed files
with
106 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
title: "YAML intelligence should fail with knitr engine" | ||
engine: julia | ||
--- | ||
|
||
This code cell has more than default 3 backticks | ||
|
||
````{julia} | ||
#| echo: 123 | ||
1 + 1 | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
--- | ||
title: "YAML intelligence should fail with knitr engine" | ||
engine: julia | ||
--- | ||
|
||
```{julia} | ||
#| echo: 123 | ||
1 + 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: "YAML intelligence should fail with knitr engine" | ||
--- | ||
|
||
This code cell has more than default 3 backticks | ||
|
||
````{python} | ||
#| echo: 123 | ||
1 + 1 | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: "YAML intelligence should fail with knitr engine" | ||
--- | ||
|
||
```{python} | ||
#| echo: 123 | ||
1 + 1 | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
--- | ||
title: "YAML intelligence should fail with knitr engine" | ||
--- | ||
|
||
This code cell has more than default 3 backticks | ||
|
||
````{r} | ||
#| echo: 123 | ||
1 + 1 | ||
```` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
--- | ||
title: "YAML intelligence should fail with knitr engine" | ||
--- | ||
|
||
```{r} | ||
#| echo: 123 | ||
1 + 1 | ||
``` |
25 changes: 25 additions & 0 deletions
25
tests/smoke/yaml-intelligence/yaml-intelligence-code-cell-options.test.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
import { testQuartoCmd } from "../../test.ts"; | ||
import { fileLoader } from "../../utils.ts"; | ||
import { printsMessage } from "../../verify.ts"; | ||
|
||
const yamlDocs = fileLoader("yaml"); | ||
|
||
const testYamlValidationFails = (file: string) => { | ||
testQuartoCmd( | ||
"render", | ||
[yamlDocs(file, "html").input, "--to", "html", "--quiet"], | ||
[printsMessage("ERROR", /Validation of YAML cell metadata failed/)], | ||
); | ||
}; | ||
|
||
const files = [ | ||
"fail-validation-knitr.qmd", | ||
"fail-validation-knitr-backticks.qmd", | ||
"fail-validation-jupyter.qmd", | ||
"fail-validation-jupyter-backticks.qmd", | ||
"fail-validation-julia.qmd", | ||
"fail-validation-julia-backticks.qmd", | ||
]; | ||
|
||
files.forEach(testYamlValidationFails); | ||
|