File tree Expand file tree Collapse file tree 5 files changed +17
-47
lines changed Expand file tree Collapse file tree 5 files changed +17
-47
lines changed Original file line number Diff line number Diff line change 8
8
include :
9
9
- r : devel
10
10
- r : release
11
- env : USE_VDIFFR =true
11
+ env : VDIFFR_RUN_TESTS =true
12
12
before_cache :
13
13
- Rscript -e 'remotes::install_cran("pkgdown")'
14
14
- Rscript -e 'remotes::install_github("tidyverse/tidytemplate")'
28
28
# don't treat missing suggested packages as error
29
29
- _R_CHECK_FORCE_SUGGESTS_=false
30
30
# switch off vdiffr by default
31
- - USE_VDIFFR =false
31
+ - VDIFFR_RUN_TESTS =false
32
32
33
33
after_success :
34
34
- Rscript -e 'covr::codecov()'
Original file line number Diff line number Diff line change @@ -55,7 +55,7 @@ Suggests:
55
55
sf (>= 0.3-4),
56
56
svglite (>= 1.2.0.9001),
57
57
testthat (>= 0.11.0),
58
- vdiffr
58
+ vdiffr (>= 0.3.0)
59
59
Enhances: sp
60
60
License: GPL-2 | file LICENSE
61
61
URL: http://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2
Original file line number Diff line number Diff line change 1
- ggplot2: 3.1.0.9000
2
- vdiffr-svg-engine: 0.9000
1
+ - vdiffr-svg-engine: 1.0
2
+ - vdiffr: 0.3.0
3
+ - freetypeharfbuzz: 0.2.5
Original file line number Diff line number Diff line change 1
- # default is equal to whether NOT_CRAN is true or not
2
- enable_vdiffr <- identical(Sys.getenv(" NOT_CRAN" ), " true" )
1
+ # vdiffr ignores failures when
2
+ # - VDIFFR_RUN_TESTS is "false" (on Travis CI with older versions and dev version of R)
3
+ # - CI is not set (on CRAN)
3
4
4
- # disable or enable vdiffr based on the state of USE_VDIFFR, if set
5
- if (identical(Sys.getenv(" USE_VDIFFR" ), " true" )) {
6
- enable_vdiffr <- TRUE
7
- } else if (identical(Sys.getenv(" USE_VDIFFR" ), " false" )) {
8
- enable_vdiffr <- FALSE
9
- }
10
-
11
- # disable vdiffr if version is old
12
- if (! requireNamespace(" vdiffr" , quietly = TRUE ) ||
13
- utils :: packageVersion(" vdiffr" ) < " 0.2.3.9001" ) {
14
- enable_vdiffr <- FALSE
15
- }
16
-
17
- expect_doppelganger <- function (title , fig ,
18
- path = NULL ,
19
- ... ,
20
- user_fonts = NULL ,
21
- verbose = FALSE ) {
22
- if (! enable_vdiffr ) {
23
- expect_error(regexp = NA , ggplot_build(fig ))
24
- return (invisible (NULL ))
25
- }
26
-
27
- vdiffr :: expect_doppelganger(title , fig ,
28
- path = path ,
29
- ... ,
30
- user_fonts = user_fonts ,
31
- verbose = verbose
32
- )
33
- }
5
+ expect_doppelganger <- vdiffr :: expect_doppelganger
Original file line number Diff line number Diff line change @@ -38,14 +38,11 @@ test_that("geom_path draws correctly", {
38
38
test_that(" NA linetype is dropped with warning" , {
39
39
df <- data_frame(x = 1 : 2 , y = 1 : 2 , z = " a" )
40
40
41
- # Somehow the warning does not slip through on ggplot_build()
42
- if (enable_vdiffr ) {
43
- expect_warning(
44
- expect_doppelganger(
45
- " NA linetype" ,
46
- ggplot(df , aes(x , y )) + geom_path(linetype = NA )
47
- ),
48
- " containing missing values"
49
- )
50
- }
41
+ expect_warning(
42
+ expect_doppelganger(
43
+ " NA linetype" ,
44
+ ggplot(df , aes(x , y )) + geom_path(linetype = NA )
45
+ ),
46
+ " containing missing values"
47
+ )
51
48
})
You can’t perform that action at this time.
0 commit comments