diff --git a/inst/tests/test_as_yaml.R b/inst/tests/test_as_yaml.R index b64118f..52e23c1 100644 --- a/inst/tests/test_as_yaml.R +++ b/inst/tests/test_as_yaml.R @@ -444,5 +444,12 @@ test_custom_tag_for_unnamed_list <- function() { test_latin1_strings <- function() { data <- list(description = enc2native("á")) result <- as.yaml(data) - checkEquals(result, enc2utf8("description: á\n")) -} \ No newline at end of file + checkEquals(result, "description: á\n") +} + +test_unknown_strings <- function() { + data <- list(x="\x9b") + result <- as.yaml(data) + checkEquals(result, "x: <9b>\n") +} +