From 1a90ba9c1c8815fdaaaf819f8843e99d8cbe54eb Mon Sep 17 00:00:00 2001 From: Shawn Garbett Date: Mon, 13 Sep 2021 14:21:01 -0500 Subject: [PATCH] Added test of issue #105 --- inst/tests/test_as_yaml.R | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) 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") +} +