tests/testthat/test-htmltidy.R

context("basic functionality")
test_that("tidying works", {

  th <- tidy_html("<b><p><a href='http://google.com'>google &gt</a></p></b>")

  expect_gte(nchar(th), 249)
  expect_equivalent(grepl("HTML Tidy for HTML5 for R", th), TRUE)

})

Try the htmltidy package in your browser

Any scripts or data that you put into this service are public.

htmltidy documentation built on Oct. 4, 2019, 1:04 a.m.