@@ -20,7 +20,7 @@ test_that(".renvignore ignores files, directories", {
20
20
expect_setequal(deps $ Package , " oatmeal" )
21
21
22
22
deps <- dependencies(" scripts" , root = getwd())
23
- expect_true(NROW(deps ) == 0 )
23
+ expect_true(NROW(deps ) == 0L )
24
24
25
25
})
26
26
@@ -35,30 +35,30 @@ test_that("ignore patterns are constructed correctly", {
35
35
# ignore data directory at root of project
36
36
expect_equal(
37
37
renv_renvignore_parse_impl(" /data" , " /project" ),
38
- " ^\\ Q/project/\\ E \\ Qdata \\ E(?:/)?$"
38
+ " ^\\ Q/project/data \\ E(?:/)?$"
39
39
)
40
40
41
41
# multiple ignores are parsed separately
42
42
expect_equal(
43
43
renv_renvignore_parse_impl(c(" /data1" , " /data2" ), " /project" ),
44
44
c(
45
- " ^\\ Q/project/\\ E \\ Qdata1 \\ E(?:/)?$" ,
46
- " ^\\ Q/project/\\ E \\ Qdata2 \\ E(?:/)?$"
45
+ " ^\\ Q/project/data1 \\ E(?:/)?$" ,
46
+ " ^\\ Q/project/data2 \\ E(?:/)?$"
47
47
)
48
48
)
49
49
50
50
# sub-directory ignores are handled
51
51
expect_equal(
52
52
renv_renvignore_parse_impl(" data/internal" , " /project" ),
53
- " ^\\ Q/project/\\ E \\ Qdata /internal\\ E(?:/)?$"
53
+ " ^\\ Q/project/data /internal\\ E(?:/)?$"
54
54
)
55
55
56
56
# negations are handled
57
57
expect_equal(
58
58
renv_renvignore_parse(c(" abc.R" , " !def.R" )),
59
59
list (
60
60
exclude = " ^\\ Q/\\ E(?:.*/)?\\ Qabc.R\\ E(?:/)?$" ,
61
- include = " ^\\ Q/\\ E\\ Qdef.R\\ E(?:/)?$"
61
+ include = " ^\\ Q/\\ E(?:.*/)? \\ Qdef.R\\ E(?:/)?$"
62
62
)
63
63
)
64
64
0 commit comments