Skip to content

Commit

Permalink
Add new test for invalid file.
Browse files Browse the repository at this point in the history
  • Loading branch information
bpvgoncalves committed Sep 16, 2023
1 parent fd01914 commit 196e901
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/testthat/test-key_open.R
Original file line number Diff line number Diff line change
Expand Up @@ -84,3 +84,14 @@ test_that("Read Sphincs+ key-pair", {
unlink(paste0(path, "/keypair.pub"))

})

test_that("Fails on bad file", {

file <- tempfile()
writeLines("qwerty", file(file))

expect_error(open_key(file))

unlink(file)

})

0 comments on commit 196e901

Please sign in to comment.