# Test Rmd Escaped specials
context("HTMLify")
test_that("Bold asterisk", expect_true(
htmlify("*\\***created\\* asdf ** **x** ") ==
"**created* asdf x "
))
test_that("Bold underline", expect_true(
htmlify("_\\___created\\_ asdf __ __x__ ") ==
"__created_ asdf x "
))
test_that("Emphasis asterisk", expect_true(
htmlify(" \\**created\\* asdf * *x* ") ==
" *created* asdf x "
))
test_that("Emphasis underline", expect_true(
htmlify("\\__created\\_ asdf _ _x_ ") ==
"_created_ asdf x "
))
test_that("Code quoted", expect_true(
htmlify("`x` asdfasdf `inline` asdfasdf") ==
"x
asdfasdf inline
asdfasdf"
))
test_that("Strikethrough double tilde", expect_true(
htmlify("`x` asdfasdf ~~`inline`~~ asdfasdf") ==
"x
asdfasdf inline
asdfasdf"
))
test_that("Subscript tilde", expect_true(
htmlify("x~2~") ==
"x2"
))
test_that("Superscript caret", expect_true(
htmlify("\u03c7^2^") ==
"\u03c72"
))
test_that("Superscript and Subscript", expect_true(
htmlify("\u03c7^2^~142~") ==
"\u03c72
142"
))
test_that("Subscript and Superscript", expect_true(
htmlify("\u03c7~142~^2^") ==
"\u03c72
142"
))
test_that("Fraction", expect_true(
htmlify("\\frac{1 234}{5 678}") ==
" 1 234/5 678"
))
test_that("Escapes Less Than", expect_true(
htmlify("<") == "<"
))
test_that("Escapes Greater Than", expect_true(
htmlify(">") == ">"
))