Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings
/xml2Public

Add test for #376#379

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
billdenney wants to merge4 commits intor-lib:main
base:main
Choose a base branch
Loading
frombilldenney:fix-376
Open
Changes from1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
PrevPrevious commit
NextNext commit
Refactor test
  • Loading branch information
@hadley
hadley committedOct 30, 2023
commitd429239f793d5dbc494ea43f0a42f99754a7bbe4
10 changes: 4 additions & 6 deletionstests/testthat/test-xml_parse.R
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -112,12 +112,10 @@ test_that("read_xml and read_html fail with > 1 input", {
})

test_that("read_xml with an invalid file allows deletion of the file (#376)", {
tmp <- tempfile(fileext = ".xml")
on.exit(unlink(tmp))
writeLines("<a>", con = tmp)
tmp <- withr::local_tempfile(lines = "<a>")

expect_error(
read_xml(tmp)
)
n_cons <- nrow(showConnections())
try(read_xml(tmp), silent = TRUE)
expect_equal(nrow(showConnections()), n_cons)
expect_true(file.remove(tmp))
})

[8]ページ先頭

©2009-2025 Movatter.jp