diff options
| author | Johannes Ranke <jranke@uni-bremen.de> | 2016-02-04 18:06:15 +0100 |
|---|---|---|
| committer | Johannes Ranke <jranke@uni-bremen.de> | 2016-02-04 18:06:15 +0100 |
| commit | d14923ae1ac023c8f8f5ae8b5c0884f4247f764b (patch) | |
| tree | 98cbafd22f11944e26fc39126096d59c64adc2d0 /pkg/tests/testthat/test_TOXSWA_cwa.R | |
| parent | 98a706373107188496a1df295697e739e51d6b06 (diff) | |
Test reading .out files and close connections
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", { |
