tests/testthat/test_left-right-mid.R

test_that( "works as expected", {

  expect_equal( left('leftmidright',4) , 'left' )
  expect_equal( left('four',5), 'four' )
  
  expect_equal( right('leftmidright',5) , 'right' )
  expect_equal( right('four',5), 'four' )

  expect_equal( mid('leftmidright', 5, 3 ) , 'mid' )
  
})

Try the easyr package in your browser

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

easyr documentation built on March 31, 2023, 6:22 p.m.