tests/testthat/test-string-distance.R

library(testthat)
library(campfin)

test_that("string distance can be found", {
  expect_equal(str_dist("abc", "abe"), 1)
  expect_equal(str_dist("testing", "besting", method = "lv"), 1)
  expect_equal(str_dist("test", "test"), 0)
})

Try the campfin package in your browser

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

campfin documentation built on Oct. 20, 2023, 5:06 p.m.