tests/testthat/test-independent-testing-fmt_quote-and-fmt_sentense.R

# Testing Quote Function
test_that("Testing of Quote", {
  expect_equal(fmt_quote('"b"'), "'b'")
  expect_equal(fmt_quote("b"), "b")
  expect_equal(fmt_quote("b"), "b")

  expect_equal(fmt_quote('"a" and "b"'), "'a' and 'b'")
})

# Testing Format_sentense
test_that("Testing of Quote", {
  expect_equal(fmt_sentence(" a "), "a")
  expect_equal(fmt_sentence(" a and b"), "a and b")

  expect_equal(fmt_sentence(" a and b "), "a and b")
  expect_equal(fmt_sentence("a and b "), "a and b")
})

Try the metalite package in your browser

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

metalite documentation built on Sept. 11, 2024, 7:18 p.m.