Skip to content

Commit

Permalink
changed encoding test
Browse files Browse the repository at this point in the history
  • Loading branch information
seankross committed Mar 15, 2016
1 parent 375b432 commit 8a49bb7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions inst/test/test-encoding.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
中文測試
4 changes: 3 additions & 1 deletion tests/testthat/test-encoding.R
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,7 @@ test_that("Trying to parse the test-encoding.yaml", {
test_path <- system.file(file.path("test", "test-encoding.yaml"), package = "swirl")
suppressWarnings(result <- test_parse(test_path))
console <- capture.output(result)
expect_equal(strsplit(console[3], "\\s+")[[1]][3], "中文測試")
wush_path <- system.file(file.path("test", "test-encoding.txt"), package = "swirl")
wush <- readLines(con = wush_path, warn = FALSE, encoding = "UTF-8")
expect_equal(strsplit(console[3], "\\s+")[[1]][3], wush)
})

0 comments on commit 8a49bb7

Please sign in to comment.