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 askpass package in your browser

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

askpass documentation built on Sept. 4, 2023, 1:06 a.m.