tests/testthat/test-string_concat.R

test_that("string concat", {
  a <- "a"
  b <- "b"

  expect_equal(a %++% b %++% a, "aba")
})

test_that("filepath concat", {
  expect_equal("hello" %//% "world", "hello/world")
  expect_equal("hello/" %//% "world", "hello/world")
  expect_equal("hello" %//% "/world", "hello/world")
  expect_equal("hello/" %//% "/world", "hello/world")
})
adamleejohnson/R-ajtools documentation built on April 4, 2022, 7:24 a.m.