tests/testthat/test-this_file.r

context( "opt_this_file" )

# TYPICAL  
  flags <- str_to_opts( "Rscript --slave --no-restore --file=test-this_file.r --args sub1" )
  file  <- this_file(flags, full.path = FALSE ) 
  
  expect_equal( file, "test-this_file.r" )
  
# MULTIPLE --file
  flags <- str_to_opts( "Rscript --slave --no-restore --file=test-this_file.r --args sub1 --file other-file" )
  this_file(flags, full.path = FALSE)

  expect_equal( file, "test-this_file.r" )
decisionpatterns/optigrab documentation built on Jan. 8, 2019, 3:28 a.m.