Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix R-devel errors #411

Closed
jimhester opened this issue Sep 26, 2019 · 1 comment
Closed

Fix R-devel errors #411

jimhester opened this issue Sep 26, 2019 · 1 comment

Comments

@jimhester
Copy link
Member

These are due to R-devel using an updated version of PCRE, which throws an error due to using \R inside a character class (which is invalid anyway).

Version: 1.0.3
Check: tests
Result: ERROR
     Running 'testthat.R' [16s/17s]
    Running the tests in 'tests/testthat.R' failed.
    Complete output:
     > library(testthat)
     > library(lintr)
     >
     > test_check("lintr")
     -- 1. Error: it returns the input trimmed strictly to max if no lints found (@te
     invalid regular expression '\[[^:]+:[[:digit:]]+:[[:digit:]]+:\]\([^)]+\)[[:space:]]\*(?:style|warning|error):\*[^\R]+\R[^\R]+\R[^\R]+\R'
     1: expect_equal(trim_output("testing a longer non_lint string", max = 7), "testing") at testthat/test-methods.R:10
     2: quasi_label(enquo(object), label, arg = "object")
     3: eval_bare(get_expr(quo), get_env(quo))
     4: trim_output("testing a longer non_lint string", max = 7)
     5: rex::re_matches(x, re, global = TRUE, locations = TRUE)
     6: mapply(process_matches, gregexpr(pattern = pattern, data, perl = TRUE, ...), data,
     SIMPLIFY = FALSE)
     7: gregexpr(pattern = pattern, data, perl = TRUE, ...)
    
     -- 2. Error: it returns the input trimmed to the last full lint if one exists wi
     invalid regular expression '\[[^:]+:[[:digit:]]+:[[:digit:]]+:\]\([^)]+\)[[:space:]]\*(?:style|warning|error):\*[^\R]+\R[^\R]+\R[^\R]+\R'
     1: expect_equal(trim_output(t1, max = 200), substr(t1, 1, 195)) at testthat/test-methods.R:14
     2: quasi_label(enquo(object), label, arg = "object")
     3: eval_bare(get_expr(quo), get_env(quo))
     4: trim_output(t1, max = 200)
     5: rex::re_matches(x, re, global = TRUE, locations = TRUE)
     6: mapply(process_matches, gregexpr(pattern = pattern, data, perl = TRUE, ...), data,
     SIMPLIFY = FALSE)
     7: gregexpr(pattern = pattern, data, perl = TRUE, ...)
    
     == testthat results ===========================================================
     [ OK: 544 | SKIPPED: 0 | WARNINGS: 2 | FAILED: 2 ]
     1. Error: it returns the input trimmed strictly to max if no lints found (@test-methods.R#10)
     2. Error: it returns the input trimmed to the last full lint if one exists within the max (@test-methods.R#14)
    
     Error: testthat unit tests failed
     Execution halted
@jimhester
Copy link
Member Author

Fixed by 386e86f

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant