-
Notifications
You must be signed in to change notification settings - Fork 188
Open
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorrmdtesting
Description
For .Rmd
, this test produces no error in the document, and so we get only 1 (expected) lint:
tmp4 <- withr::local_tempfile(fileext = ".Rmd")
cat(
trim_some(
'---
title: "Some file"
---
No code and no terminal newline'
),
file = tmp4
)
expect_lint(content = NULL, file = tmp4, list(
message = msg2,
line_number = 5L,
# We can't get 4 here because the line is NA-masked in get_source_expressions(), so no line length info exists.
column_number = 1L
), linter)
For .qmd
, the code in question leads to an error (and therefore 2 lints are produced):
tmp6 <- withr::local_tempfile(fileext = ".qmd")
cat(
trim_some(
'---
title: "Some file"
---
No code and no terminal newline'
),
file = tmp6
)
expect_lint(content = NULL, file = tmp6, list(
message = msg2,
line_number = 5L,
# We can't get 4 here because the line is NA-masked in get_source_expressions(), so no line length info exists.
column_number = 1L
), linter)
Do we need to have this test for Quarto documents?
If yes, how should we go about it? Just change the test to expect 2 lints?
Metadata
Metadata
Assignees
Labels
bugan unexpected problem or unintended behavioran unexpected problem or unintended behaviorrmdtesting