Skip to content

Commit f03cda6

Browse files
committed
More robust json file paths roundtrip test
1 parent d33b7fb commit f03cda6

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

tests/tests.R

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,8 @@ test_identical(jsondec('{"x":-}'), list()) # Invalid number (bare minus)
405405
test_identical(jsondec('-'), list()) # Top-level invalid number
406406
test_identical(jsondec('{"x":--1}'), list()) # Double minus
407407
test_identical(jsondec('["a'), list()) # Unterminated string in array
408-
test_identical(jsondec(jsonenc(.libPaths())), as.list(.libPaths()))
408+
paths <- c(.libPaths(), tempdir())
409+
test_identical(jsondec(jsonenc(paths)), as.list(paths))
409410
if (!(.Platform[["OS.type"]] == "windows" && getRversion() < "4.2")) {
410411
# Unicode escape sequence tests (RFC 8259 Section 7):
411412
test_equal(jsondec('{"a":"\\u0041"}')[["a"]], "A") # U+0041 = A (ASCII via Unicode escape)

0 commit comments

Comments
 (0)