diff options
Diffstat (limited to 'pkg/tests/testthat/test_TOXSWA_cwa.R')
-rw-r--r-- | pkg/tests/testthat/test_TOXSWA_cwa.R | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/pkg/tests/testthat/test_TOXSWA_cwa.R b/pkg/tests/testthat/test_TOXSWA_cwa.R index 407a7a1..7c9a73c 100644 --- a/pkg/tests/testthat/test_TOXSWA_cwa.R +++ b/pkg/tests/testthat/test_TOXSWA_cwa.R @@ -12,6 +12,13 @@ H_sw_R1_stream <- read.TOXSWA_cwa("00003s_pa.cwa", basedir = basedir_test, zipfile = zipfile_test) +basedir_test_2 = "SwashProjects/Project_1/TOXSWA" + +EXSW2_R1_stream <- read.TOXSWA_cwa("3.out", + basedir = basedir_test_2, + zipfile = zipfile_test) + + test_that("TOXSWA cwa file is correctly read and printed", { @@ -29,6 +36,12 @@ test_that("TOXSWA cwa file is correctly read and printed", { # The basedir is not printed, therefore tested separately expect_equal(H_sw_D4_pond$basedir, basedir_test) + + EXSW2_R1_stream_printed <- capture.output(print(EXSW2_R1_stream)) + expect_equal(EXSW2_R1_stream_printed, readLines("EXSW2_R1_stream_printed.txt")) + + # The basedir is not printed, therefore tested separately + expect_equal(H_sw_D4_pond$basedir, basedir_test) }) test_that("Getting events and moving window analysis works", { |