tests/testthat/test-function-read_binary_radolan_file_raw_v2.R

test_that("read_binary_radolan_file_raw_v2() works", {

  f <- kwb.dwd:::read_binary_radolan_file_raw_v2

  expect_error(f())

  expect_error(expect_warning(f("no-such-file")))

  # Create a non-valid test file
  file <- tempfile("test-")
  writeLines("this is a test", file)

  expect_error(f(file))
})
KWB-R/kwb.dwd documentation built on Sept. 28, 2022, 6:03 p.m.