Running ‘testthat.R’
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(lintr)
  > 
  > test_check("lintr")
  1. Error: returns the correct linting (@test-absolute_paths_linter.R#3) --------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, absolute_paths_linter) at testthat/test-absolute_paths_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  2. Error: returns the correct linting (@test-assignment_linter.R#4) ------------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, assignment_linter) at testthat/test-assignment_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  3. Error: returns the correct linting (@test-closed_curly_linter.R#4) ----------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, closed_curly_linter()) at testthat/test-closed_curly_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  4. Error: returns the correct linting (@test-commas_linter.R#4) ----------------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, commas_linter) at testthat/test-commas_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  5. Error: returns the correct linting (@test-commented_code_linter.R#3) --------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, commented_code_linter) at testthat/test-commented_code_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  6. Error: returns the correct linting (@test-error.R#3) ------------------------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("\"\\R\"", rex("is an unrecognized escape in character string starting")) at testthat/test-error.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  7. Error: it excludes properly (@test-exclusions.R#153) ------------------------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: lint("exclusions-test") at testthat/test-exclusions.R:153
  2: get_source_expressions(filename)
  3: extract_r_source(source_file$filename, source_file$lines)
  4: get_knitr_pattern(filename, lines)
  5: detect_pattern(lines, tolower(file_ext(filename)))
  6: grep(pat, text)
  
  8. Error: returns the correct linting (@test-infix_spaces_linter.R#29) ---------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, infix_spaces_linter) at testthat/test-infix_spaces_linter.R:29
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  9. Error: it handles reStructuredText (@test-knitr_formats.R#25) ---------------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint(file = "knitr_formats/test.Rrst", checks = list(rex("Use <-, not =, for assignment."), 
         rex("local variable"), rex("Use <-, not =, for assignment."), rex("Trailing blank lines are superfluous.")), 
         default_linters) at testthat/test-knitr_formats.R:25
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  10. Error: it handles asciidoc (@test-knitr_formats.R#58) ----------------------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint(file = "knitr_formats/test.Rtxt", checks = list(rex("Use <-, not =, for assignment."), 
         rex("local variable"), rex("Use <-, not =, for assignment."), rex("Trailing blank lines are superfluous.")), 
         default_linters) at testthat/test-knitr_formats.R:58
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  11. Error: returns the correct linting (@test-line_length_linter.R#4) ----------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, line_length_linter(80)) at testthat/test-line_length_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  12. Error: returns the correct linting (@test-multiple_dots_linter.R#3) --------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, multiple_dots_linter) at testthat/test-multiple_dots_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  13. Error: variables from attached external packages are ignored (@test-multiple_dots_linter.R#12) 
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("print.data.frame", NULL, multiple_dots_linter) at testthat/test-multiple_dots_linter.R:12
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  14. Error: returns the correct linting (@test-no_tab_linter.R#4) ---------------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, no_tab_linter) at testthat/test-no_tab_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  15. Error: returns the correct linting (@test-object_camel_case_linter.R#3) ----
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, camel_case_linter) at testthat/test-object_camel_case_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  16. Error: returns the correct linting (@test-object_length_linter.R#4) --------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, object_length_linter()) at testthat/test-object_length_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  17. Error: returns the correct linting (@test-object_snake_case_linter.R#3) ----
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, snake_case_linter) at testthat/test-object_snake_case_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  18. Error: returns the correct linting (@test-object_usage_linter.R#3) ---------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, object_usage_linter) at testthat/test-object_usage_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  19. Error: eval errors are ignored (@test-object_usage_linter.R#91) ------------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("\n    setMethod(\"[[<-\", c(\"stampedEnv\", \"character\", \"missing\"),\n      function(x) {\n        x\n      })", 
         NULL, object_usage_linter) at testthat/test-object_usage_linter.R:91
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  20. Error: returns the correct linting (@test-open_curly_linter.R#4) -----------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, open_curly_linter()) at testthat/test-open_curly_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  21. Error: returns the correct linting (@test-single_quotes_linter.R#3) --------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, single_quotes_linter) at testthat/test-single_quotes_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  22. Error: returns the correct linting (@test-spaces_inside_linter.R#4) --------
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, spaces_inside_linter) at testthat/test-spaces_inside_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  23. Error: returns the correct linting (@test-spaces_left_parentheses_linter.R#4) 
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, spaces_left_parentheses_linter) at testthat/test-spaces_left_parentheses_linter.R:4
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  24. Error: returns the correct linting (@test-trailing_blank_lines_linter.R#3) -
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, trailing_blank_lines_linter) at testthat/test-trailing_blank_lines_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  25. Error: returns the correct linting (@test-trailing_whitespace_linter.R#3) --
  invalid regular expression '(?<!(^|
  )``)`r[ #]([^`]+)\s*`', reason 'Invalid regexp'
  1: expect_lint("blah", NULL, trailing_whitespace_linter) at testthat/test-trailing_whitespace_linter.R:3
  2: expectation_lint(content, checks, ...)
  3: lint(filename, ...)
  4: get_source_expressions(filename)
  5: extract_r_source(source_file$filename, source_file$lines)
  6: get_knitr_pattern(filename, lines)
  7: detect_pattern(lines, tolower(file_ext(filename)))
  8: grep(pat, text)
  
  testthat results ================================================================
  OK: 128 SKIPPED: 0 FAILED: 25
  1. Error: returns the correct linting (@test-absolute_paths_linter.R#3) 
  2. Error: returns the correct linting (@test-assignment_linter.R#4) 
  3. Error: returns the correct linting (@test-closed_curly_linter.R#4) 
  4. Error: returns the correct linting (@test-commas_linter.R#4) 
  5. Error: returns the correct linting (@test-commented_code_linter.R#3) 
  6. Error: returns the correct linting (@test-error.R#3) 
  7. Error: it excludes properly (@test-exclusions.R#153) 
  8. Error: returns the correct linting (@test-infix_spaces_linter.R#29) 
  9. Error: it handles reStructuredText (@test-knitr_formats.R#25) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted