Skip to content

Commit 0f62311

Browse files
committed
Add a test to cover this issue
1 parent 927aed1 commit 0f62311

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

tests/testthat/test-qenv_within.R

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -154,3 +154,15 @@ testthat::test_that("Code executed with integer shorthand (1L) is the same as or
154154
q <- within(qenv(), a <- 1L)
155155
testthat::expect_identical(get_code(q), "a <- 1L")
156156
})
157+
158+
159+
testthat::test_that("Chinese characters are handled properly (issue 284)", {
160+
q <- within(qenv(), {
161+
"无进展生存期 (月)"
162+
"总生存期 (月)"
163+
"缓解持续时间 (月)"
164+
"确认的缓解持续时间 (月)"
165+
})
166+
167+
expect_equal(lengths(strsplit(get_code(q), split = "\n", fixed = TRUE)), 4L)
168+
})

0 commit comments

Comments
 (0)