inst/tests/test-js-quote.R

context("test_js_quote")
test_that("plaintext works", {  
  string <- "text here"
  expect_match(jsQuote(string), "^['\"]text here['\"]$")  
})

test_that("newline works", {  
  string <- "text\nhere"
  expect_match(jsQuote(string), "^['\"]text\\\\nhere['\"]$")
})
skranz/shinyAce2 documentation built on May 30, 2019, 3:02 a.m.