File: test-parser.R

package info (click to toggle)
r-cran-commonmark 2.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 1,204 kB
  • sloc: ansic: 10,182; sh: 15; makefile: 6
file content (8 lines) | stat: -rw-r--r-- 271 bytes parent folder | download
1
2
3
4
5
6
7
8
#If this breaks you need to re-apply https://github.com/commonmark/cmark/pull/376

test_that("illegal unicode is replaced with tofu", {
  text <- "foo\023bar"
  xml <- markdown_xml(text)
  doc <- xml2::read_xml(xml)
  expect_equal(xml2::xml_text(doc), "foo\uFFFDbar")
})