tests/testdata/askpass/tests/testthat/test-option.R

context("test-option")

test_that("program exists", {
  if(is_windows() || is_macos()){
    expect_true(file.exists(ssh_askpass()))
  }
})

test_that("option askpass is respected", {
  options(askpass = function(...){
    'supersecret'
  })
  expect_equal(askpass(), 'supersecret')
})

Try the rang package in your browser

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

rang documentation built on Oct. 8, 2023, 5:06 p.m.