Improve test coverage in CA
Change-Id: I04a18720a4988ade4c964eb7bfc177542b2777c0
diff --git a/tests/testthat/test-collocations.R b/tests/testthat/test-collocations.R
index b97424b..43f39a2 100644
--- a/tests/testthat/test-collocations.R
+++ b/tests/testthat/test-collocations.R
@@ -35,8 +35,14 @@
test_that("collocationAnalysis on unaccounted strings does not error out", {
kco <- new("KorAPConnection", accessToken = NULL, verbose = TRUE)
expect_warning(
- df <- collocationAnalysis(kco, "XXXXXXXXAmeisenplage"),
+ df <- collocationAnalysis(kco, "XXXXXXXXAmeisenplage", vc=c("corpusSigle=/WDD17/", "corpusSigle=/WUD17/")),
"access token"
)
testthat::expect_equal(nrow(df), 0)
})
+
+test_that("temoveWithinSpanWorks", {
+ expect_equal(
+ removeWithinSpan("contains(<base/s=s>, (machen []{0,1} aufmerksam | aufmerksam []{0,1} machen))", "base/s=s"),
+ "(machen []{0,1} aufmerksam | aufmerksam []{0,1} machen)")
+})