Skip to content

Commit

Permalink
fixed encoding test
Browse files Browse the repository at this point in the history
  • Loading branch information
seankross committed May 3, 2019
1 parent a0fb74b commit 87d97d1
Show file tree
Hide file tree
Showing 44 changed files with 38 additions and 48 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Description: Use the R console as an interactive learning
environment. Users receive immediate feedback as they are guided through
self-paced lessons in data science and R programming.
URL: http://swirlstats.com
Version: 2.4.3
Version: 2.4.4
License: MIT + file LICENSE
Authors@R: c(
person("Sean", "Kross", email = "sean@seankross.com", role = c("aut", "cre")),
Expand All @@ -30,4 +30,4 @@ Suggests:
Encoding: UTF-8
LazyData: true
Roxygen: list(wrap = FALSE)
RoxygenNote: 5.0.1
RoxygenNote: 6.1.1
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# swirl 2.4.4

* Fixed encoding test which was failing on CRAN (debian-clang-devel).

# swirl 2.4.3

* Added "swirl_is_fun" option to `swirl_options()`.
Expand Down
4 changes: 2 additions & 2 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
## Release summary

This is the first attempted CRAN release of swirl 2.4.3.
This is the first attempted CRAN release of swirl 2.4.4.

## Test environments

* local macOS Sierra install, R 3.3.2
* local macOS Sierra install, R 3.6.0
* Ubuntu 12.04 (on travis-ci), R 3.3.2, R 3.2.5, R-devel.
* win-builder (release)

Expand Down
3 changes: 2 additions & 1 deletion man/AnswerTests.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/InstallCourses.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/any_of_exprs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/bye.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/calculates_same_value.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/delete_progress.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/email_admin.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/expr_creates_var.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/expr_identical_to.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/expr_is_a.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/expr_uses_func.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/func_of_newvar_equals.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/info.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_course.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_course_directory.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_course_dropbox.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_course_github.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_course_google_drive.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_course_url.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_course_zip.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/install_from_swirl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/is_robust_match.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/main.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/nxt.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/omnitest.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/play.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/reset.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/restart.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/rmatch_calls.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/select_language.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/skip.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/submit.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/swirl.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/swirl_options.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/uninstall_all_courses.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/uninstall_course.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/val_has_length.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/val_matches.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/var_is_a.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/zip_course.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

9 changes: 5 additions & 4 deletions tests/testthat/test-encoding.R
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ test_that("Trying to parse the test-encoding.yaml", {
if(grepl("[L|l]atin", locale)){
testthat::skip("Locale is Latin")
}
skip_on_os("windows")

test_parse <- function(file) {
class(file) <- get_content_class(file)
Expand All @@ -18,12 +19,12 @@ test_that("Trying to parse the test-encoding.yaml", {
console <- capture.output(result)
test_phrase <- strsplit(console[3], "\\s+")[[1]][3]

if(.Platform$OS.type == "windows"){
#if(.Platform$OS.type == "windows"){
expect_true(
identical(stri_escape_unicode(test_phrase), "<U+4E2D><U+6587><U+6E2C><U+8A66>") ||
identical(stri_escape_unicode(test_phrase), stri_escape_unicode("中文測試"))
)
} else {
expect_equal(stri_escape_unicode(test_phrase), stri_escape_unicode("中文測試"))
}
#} else {
# expect_equal(stri_escape_unicode(test_phrase), stri_escape_unicode("中文測試"))
#}
})

0 comments on commit 87d97d1

Please sign in to comment.