Skip to content

Commit 4a7030c

Browse files
committed
Added a test for "bleeding par"
1 parent 10dd479 commit 4a7030c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

tests/testthat/tests-config.R

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,12 +35,15 @@ test_that("config temp", {
3535
df <- data.frame(x = 1:10, y=1:10, z = seq(2,20,2))
3636

3737
gsp <- gsplot(config.file = system.file("extdata", "lineScatter.yaml", package = "gsplot")) %>%
38-
lines(df$x, df$y, col="red", legend.name = "points")
38+
lines(df$x, df$y, col="red", legend.name = "points") %>%
39+
legend()
3940
expect_true(gsp$global$config$config.file)
41+
expect_equal(par(no.readonly = TRUE)$lwd, 0.8)
4042

4143
gspDef <- gsplot() %>%
4244
lines(df$x, df$y, col="red", legend.name = "points")
4345
expect_false(gspDef$global$config$config.file)
46+
expect_equal(par(no.readonly = TRUE)$lwd, 1)
4447

4548
loadConfig(system.file("extdata", "lineScatter.yaml", package = "gsplot"))
4649
gsp <- gsplot() %>%

0 commit comments

Comments
 (0)