tests/testthat/tests.R

context("Tests")

test_that("slug", {
  x <- "HELLO WORLD!!!"

  expect_identical(slugify(x), "hello_world")
  expect_identical(slugify(x, alphanum_replace="@"), "hello_world@@@")
  expect_identical(slugify(x, space_replace="-"), "hello-world")
})
cannin/slugify documentation built on June 10, 2022, 11:38 a.m.