Running ‘testthat.R’ [3s/5s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(TeXCheckR)
  > 
  > test_check("TeXCheckR")
  ── 1. Error: Locations (@test-locate_latex_argument.R#5)  ──────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: parse_tex(Line1) at testthat/test-locate_latex_argument.R:5
  2: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  3: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ✖ 4: \chapter{A chapter with wrong prefix}\label{sec:should-be-chap:}✖ 4: \chapter{A chapter without a label}── 2. Error: Extract textbf (@test_extract_LaTeX_argument.R#4)  ────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_LaTeX_argument("The contents of \\textbf{ABC} is abc.", "textbf") at testthat/test_extract_LaTeX_argument.R:4
  2: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  3: parse_tex(tex_lines)
  4: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  5: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 3. Error: Extract textcites (@test_extract_LaTeX_argument.R#11)  ────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_LaTeX_argument("Some citation by \\textcites{Knuth194}{Knuth195}", "textcites", 
         n = 2L) at testthat/test_extract_LaTeX_argument.R:11
  2: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  3: parse_tex(tex_lines)
  4: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  5: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 4. Error: Extract nested (@test_extract_LaTeX_argument.R#18)  ───────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_LaTeX_argument("What should this be \\emph{Some emphasized text \\emph{Double emphasized} here.}", 
         "emph") at testthat/test_extract_LaTeX_argument.R:18
  2: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  3: parse_tex(tex_lines)
  4: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  5: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 5. Error: Optional argument (@test_extract_LaTeX_argument.R#32)  ────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_LaTeX_argument("See \\textcite[Ante][Post]{Knuth1} [if you want].", command_name = "textcite", 
         n = 2L, optional = TRUE) at testthat/test_extract_LaTeX_argument.R:32
  2: extract_optional_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  3: parse_tex(tex_lines)
  4: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  5: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 6. Error: Multi-line starred (@test_extract_LaTeX_argument.R#58)  ───────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_LaTeX_argument(c("This \\footnote{", "ends", "here.}"), "footnote") at testthat/test_extract_LaTeX_argument.R:58
  2: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  3: parse_tex(tex_lines)
  4: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  5: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 7. Error: Multi-line (@test_extract_LaTeX_argument.R#78)  ───────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_mandatory_LaTeX_argument(tex_lines, "footnote", by.line = TRUE) at testthat/test_extract_LaTeX_argument.R:78
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 8. Error: Optional argument interference (@test_extract_LaTeX_argument.R#107)
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_equal(extract_mandatory_LaTeX_argument("\\abc{def}", "abc")[["extract"]], 
         "def") at testthat/test_extract_LaTeX_argument.R:107
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: extract_mandatory_LaTeX_argument("\\abc{def}", "abc")
  5: parse_tex(tex_lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 9. Error: Multi-lines (@test_extract_LaTeX_argument.R#120)  ─────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_mandatory_LaTeX_argument(dbl_col_fig, "doublecolumnfigure", n = 2L) at testthat/test_extract_LaTeX_argument.R:120
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 10. Error: Road congestion example (@test_extract_LaTeX_argument.R#142)  ────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_mandatory_LaTeX_argument(road_congestion, "includegraphics") at testthat/test_extract_LaTeX_argument.R:142
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 11. Error: Whitespace gobbling (@test_extract_LaTeX_argument.R#157)  ────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_mandatory_LaTeX_argument("\\footnote {abc}", "footnote") at testthat/test_extract_LaTeX_argument.R:157
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 12. Error: Optional argument (@test_extract_LaTeX_argument.R#165)  ──────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_optional_LaTeX_argument("\\textcite[][\\textcite[a][b]c]{A}", "textcite", 
         n = 2) at testthat/test_extract_LaTeX_argument.R:165
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 13. Error: Argument requested but missing (@test_extract_LaTeX_argument.R#179
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_mandatory_LaTeX_argument("\\XYZ{AA}{BB}{CC} \\XYZ{DD}{EE} \\XYZ{FF}", "XYZ", 
         n = 2L) at testthat/test_extract_LaTeX_argument.R:179
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 14. Error: Environments (@test_extract_LaTeX_argument.R#194)  ───────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_mandatory_LaTeX_argument(road_congestion, "begin{smallbox}") at testthat/test_extract_LaTeX_argument.R:194
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 15. Error: Optional containing square brackets (@test_extract_LaTeX_argument.
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_mandatory_LaTeX_argument("\\abc[[def]]{ghi}", "abc") at testthat/test_extract_LaTeX_argument.R:206
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 16. Error: % et sqq should not be included in extract (@test_extract_LaTeX_ar
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: extract_mandatory_LaTeX_argument(c("\\abc{de%FGH}", "fgh}"), command_name = "abc") at testthat/test_extract_LaTeX_argument.R:216
  2: parse_tex(tex_lines)
  3: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  4: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 17. Error: Known results (@test_fill_nth_LaTeX_argument.R#5)  ───────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: fill_nth_LaTeX_argument(parsed_doc = parse_tex(y1), "textcites", n = 1L) at testthat/test_fill_nth_LaTeX_argument.R:5
  2: locate_mandatory_LaTeX_argument(parsed_doc = parsed_doc, command_name = command_name, 
         n = n)
  3: parse_tex(y1)
  4: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  5: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 18. Failure: Invalid typography stops (@test_footnote_typography.R#12)  ─────
  `check_footnote_typography("./fnote-typogr/doesnt-end-with-period.tex")` threw an error with unexpected message.
  Expected match: "does not end with full stop"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 19. Failure: Invalid typography stops (@test_footnote_typography.R#14)  ─────
  `check_footnote_typography("./fnote-typogr/doesnt-end-with-period-multiline.tex")` threw an error with unexpected message.
  Expected match: "does not end with full stop"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 20. Failure: Invalid typography stops (@test_footnote_typography.R#16)  ─────
  `check_footnote_typography("./fnote-typogr/notok-end-itemize.tex")` threw an error with unexpected message.
  Expected match: "does not end with full stop"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 21. Failure: Invalid typography stops (@test_footnote_typography.R#19)  ─────
  `check_footnote_typography("./fnote-typogr/full-stop-after.tex")` threw an error with unexpected message.
  Expected match: "[pP]unctuation after footnote"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 22. Failure: Invalid typography stops (@test_footnote_typography.R#24)  ─────
  `check_footnote_typography("./fnote-typogr/colon-then-equation.tex")` threw an error with unexpected message.
  Expected match: "[pP]unctuation after footnotemark"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 23. Failure: Invalid typography stops (@test_footnote_typography.R#28)  ─────
  `tryCatch(...)` produced no output
  
  ── 24. Error: fread_bib output (@test_fread_bib.R#4)  ──────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: fread_bib("./fread-bib/1.bib") at testthat/test_fread_bib.R:4
  2: bibDT[, .(dups = anyDuplicated(field)), by = key]
  3: `[.data.table`(bibDT, , .(dups = anyDuplicated(field)), by = key)
  
  ── 25. Error: Inputs of (no preamble) (@test_inputs_of.R#4)  ───────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: inputs_of("extract/road-congestion.tex") at testthat/test_inputs_of.R:4
  2: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs) %>% 
         rbindlist
  3: eval(lhs, parent, parent)
  4: eval(lhs, parent, parent)
  5: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs)
  6: FUN(X[[i]], ...)
  7: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  8: parse_tex(tex_lines)
  9: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  10: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 26. Error: Includes x (@test_inputs_of.R#14)  ───────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: inputs_of("inputs-of/inputs-includes.tex", exclude.preamble = FALSE, append.tex = FALSE) at testthat/test_inputs_of.R:14
  2: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs) %>% 
         rbindlist
  3: eval(lhs, parent, parent)
  4: eval(lhs, parent, parent)
  5: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs)
  6: FUN(X[[i]], ...)
  7: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  8: parse_tex(tex_lines)
  9: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  10: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 27. Error: parse_tex single group (@test_parse_tex.R#15)  ───────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: parse_tex(x) at testthat/test_parse_tex.R:15
  2: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  3: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 28. Error: GRP_ID identifies group (@test_parse_tex.R#26)  ──────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: parse_tex(x) at testthat/test_parse_tex.R:26
  2: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  3: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 29. Error: Verify % is not parsed (@test_parse_tex.R#31)  ───────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_identical(parse_tex(c("A {", "f ", "Z}")), parse_tex(c("A {", "f %}", "Z}%[]"))) at testthat/test_parse_tex.R:31
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: parse_tex(c("A {", "f ", "Z}"))
  5: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  6: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 30. Error: Parse tiny documents (@test_parse_tex.R#38)  ─────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_identical(parse_tex(c("", "A{B}"))[["GROUP_ID1"]], c(NA_integer_, 1L, 1L, 
         1L)) at testthat/test_parse_tex.R:38
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: parse_tex(c("", "A{B}"))
  5: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  6: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 31. Error: sort bib correctly sorts (@test_sort_bib.R#7)  ───────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: reorder_bib("./sort-bib/incorrectly-sorted.bib", "./sort-bib/correctly-sorted-out.bib") at testthat/test_sort_bib.R:7
  2: bib2DT(file.bib, to_sort = TRUE)
  3: data.table(line_no = seq_along(bib), bib = bib, line_by_entry_no = line_by_entry_no, 
         is_field = is_field, is_closing = is_closing) %>% .[, `:=`(key, if_else(is_at, 
         gsub("^@[A-Za-z]+\\{(.*),$", "\\1", bib, perl = TRUE), NA_character_))] %>% .[, 
         `:=`(key, zoo::na.locf(key, na.rm = FALSE))] %>% .[, `:=`(author, extract_field_from("author", 
         bib))] %>% .[, `:=`(title, extract_field_from("title", bib))] %>% .[, `:=`(year, 
         extract_field_from("year", bib))] %>% .[, `:=`(date, extract_field_from("date", 
         bib))] %>% {
         dot <- .
         if (!to_sort) {
             out <- dot %>% .[, `:=`(address, extract_field_from("address", bib))] %>% 
                 .[, `:=`(annote, extract_field_from("annote", bib))] %>% .[, `:=`(booktitle, 
                 extract_field_from("booktitle", bib))] %>% .[, `:=`(booktitle, extract_field_from("booktitle", 
                 bib))] %>% .[, `:=`(chapter, extract_field_from("chapter", bib))] %>% 
                 .[, `:=`(crossref, extract_field_from("crossref", bib))] %>% .[, `:=`(options, 
                 extract_field_from("options", bib))] %>% .[, `:=`(related, extract_field_from("related", 
                 bib))] %>% .[, `:=`(edition, extract_field_from("edition", bib))] %>% 
                 .[, `:=`(editor, extract_field_from("editor", bib))] %>% .[, `:=`(howpublished, 
                 extract_field_from("howpublished", bib))] %>% .[, `:=`(institution, extract_field_from("institution", 
                 bib))] %>% .[, `:=`(month, extract_field_from("month", bib))] %>% .[, 
                 `:=`(note, extract_field_from("note", bib))] %>% .[, `:=`(number, extract_field_from("number", 
                 bib))] %>% .[, `:=`(organization, extract_field_from("organization", 
                 bib))] %>% .[, `:=`(pages, extract_field_from("pages", bib))] %>% .[, 
                 `:=`(publisher, extract_field_from("publisher", bib))] %>% .[, `:=`(school, 
                 extract_field_from("school", bib))] %>% .[, `:=`(series, extract_field_from("series", 
                 bib))] %>% .[, `:=`(type, extract_field_from("type", bib))] %>% .[, `:=`(volume, 
                 extract_field_from("volume", bib))] %>% .[, `:=`(url, extract_field_from("url", 
                 bib))] %>% .[, `:=`(edition, extract_field_from("edition", bib))]
         }
         else {
             out <- dot
         }
         out
     } %>% .[, `:=`(date, if_else(grepl("/", date, fixed = TRUE), substr(date, 0, 4), 
         date))] %>% .[, `:=`(Year_as_date, if_else(grepl("[0-9]{4}", year), paste0(year, 
         "-01-01"), year))] %>% .[, `:=`(Date, coalesce(date, Year_as_date))] %>% .[, 
         `:=`(Surname, if_else(!is.na(author), if_else(grepl("^[{]", author, perl = TRUE), 
             gsub("[{}]", "", author, perl = TRUE), if_else(grepl("^[A-Z][a-z]+,", author, 
                 perl = TRUE), author, rev_forename_surname_bibtex(author))), NA_character_))] %>% 
         .[, `:=`(intra_key_line_no, seq_len(.N)), by = "key"] %>% .[, `:=`(Line_no, line_no)] %>% 
         .[, `:=`(field_name, gsub("[^a-z]", "", gsub("[=].*$", "", bib, perl = TRUE), 
             perl = TRUE))] %>% .[, `:=`(field_name, if_else(is_at, "AT", field_name))] %>% 
         .[, `:=`(field_name, if_else(is_closing, "}", field_name))] %>% .[, `:=`(field_name, 
         factor(field_name, levels = c("AT", "author", "title", "year", "date", "address", 
             "annote", "booktitle", "chapter", "crossref", "options", "related", "edition", 
             "editor", "howpublished", "institution", "month", "note", "number", "organization", 
             "pages", "publisher", "school", "series", "type", "volume", "url", "Year_as_date", 
             "Date", "Surname", "intra_key_line_no", "Line_no", "}"), ordered = TRUE))] %>% 
         .[, `:=`(bib_orig, bib)] %>% .[, lapply(.SD, zoo::na.locf, na.rm = FALSE, fromLast = FALSE), 
         by = "key", .SDcols = author:bib_orig] %>% .[, lapply(.SD, zoo::na.locf, na.rm = FALSE, 
         fromLast = TRUE), by = "key", .SDcols = author:bib_orig] %>% setorder(Surname, 
         Date, title, field_name, Line_no) %>% .[]
  4: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  5: eval(quote(`_fseq`(`_lhs`)), env, env)
  6: eval(quote(`_fseq`(`_lhs`)), env, env)
  7: `_fseq`(`_lhs`)
  8: freduce(value, `_function_list`)
  9: function_list[[i]](value)
  10: .[, `:=`(intra_key_line_no, seq_len(.N)), by = "key"]
  11: `[.data.table`(., , `:=`(intra_key_line_no, seq_len(.N)), by = "key")
  
  ── 32. Error: School funding report checks out (@test_spellcheck.R#9)  ─────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./SchoolFunding/SchoolFunding.tex", known.correct = c("SRS", 
         "SE.XPD.TOTL.GD.XS", "WDI", "SSNP", "underfunded", "overfund[a-z]*", "NMS", "WPI", 
         "DET", "phas", "NP", "SATs", "ENG", "th", "stds", "RCTs", "CAGR"), ignore.lines = 1551)) at testthat/test_spellcheck.R:9
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./SchoolFunding/SchoolFunding.tex", known.correct = c("SRS", "SE.XPD.TOTL.GD.XS", 
         "WDI", "SSNP", "underfunded", "overfund[a-z]*", "NMS", "WPI", "DET", "phas", 
         "NP", "SATs", "ENG", "th", "stds", "RCTs", "CAGR"), ignore.lines = 1551)
  5: parse_tex(lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 33. Failure: Check spelling of multiple input document (@test_spellcheck.R#17
  `check_spelling("./spellcheck_multi_input/spellcheck_multi_input.tex")` threw an error with unexpected message.
  Expected match: "failed on above line"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 34. Error: Initalisms (@test_spellcheck.R#26)  ──────────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./spelling/abbrev/abbrev-defd-ok.tex")) at testthat/test_spellcheck.R:26
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./spelling/abbrev/abbrev-defd-ok.tex")
  5: parse_tex(lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 35. Error: Initialism checking doesn't fail if at start of sentence (@test_sp
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./spelling/abbrev/abbrev-at-line-start.tex")) at testthat/test_spellcheck.R:35
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./spelling/abbrev/abbrev-at-line-start.tex")
  5: parse_tex(lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 36. Failure: Add to dictionary, ignore spelling in (@test_spellcheck.R#39)  ─
  `check_spelling("./spelling/add_to_dictionary-wrong.tex")` threw an error with unexpected message.
  Expected match: "[Ss]pellcheck failed"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 37. Failure: Add to dictionary, ignore spelling in (@test_spellcheck.R#40)  ─
  `check_spelling("./spelling/ignore_spelling_in-wrong.tex", pre_release = FALSE)` threw an error with unexpected message.
  Expected match: "[Ss]pellcheck failed"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 38. Error: Add to dictionary, ignore spelling in (@test_spellcheck.R#43)  ───
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./spelling/add_to_dictionary-ok.tex")) at testthat/test_spellcheck.R:43
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./spelling/add_to_dictionary-ok.tex")
  5: parse_tex(lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 39. Failure: Ignore spelling in input (@test_spellcheck.R#53)  ──────────────
  `check_spelling("./spelling/input/a.tex", pre_release = TRUE)` threw an error with unexpected message.
  Expected match: "Spellcheck failed on above line with .asofihsafioh"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 40. Error: Ignore spelling in input (@test_spellcheck.R#55)  ────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./spelling/input/a.tex", pre_release = FALSE)) at testthat/test_spellcheck.R:55
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./spelling/input/a.tex", pre_release = FALSE)
  5: inputs_of(filename)
  6: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs) %>% 
         rbindlist
  7: eval(lhs, parent, parent)
  8: eval(lhs, parent, parent)
  9: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs)
  10: FUN(X[[i]], ...)
  11: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  12: parse_tex(tex_lines)
  13: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  14: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 41. Failure: Stop if present (@test_spellcheck.R#62)  ───────────────────────
  `check_spelling("./stop_if_present_inputs/stop-if-held-in-inputs.tex")` threw an error with unexpected message.
  Expected match: "skillset"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 42. Error: Stop if present (@test_spellcheck.R#64)  ─────────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./stop_if_present/should-not-stop.tex")) at testthat/test_spellcheck.R:64
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./stop_if_present/should-not-stop.tex")
  5: parse_tex(lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 43. Failure: Lower-case governments should error (@test_spellcheck.R#68)  ───
  `check_spelling("./spelling/Govt/NSWgovt.tex")` threw an error with unexpected message.
  Expected match: "uppercase G"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 44. Failure: Lower-case governments should error (@test_spellcheck.R#69)  ───
  `check_spelling("./spelling/Govt/ACTgovt.tex")` threw an error with unexpected message.
  Expected match: "uppercase G"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 45. Failure: Lower-case governments should error (@test_spellcheck.R#70)  ───
  `check_spelling("./spelling/Govt/NTgovt.tex")` threw an error with unexpected message.
  Expected match: "uppercase G"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 46. Failure: Lower-case governments should error (@test_spellcheck.R#71)  ───
  `check_spelling("./spelling/Govt/Queenslandgovt.tex")` threw an error with unexpected message.
  Expected match: "uppercase G"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 47. Failure: Lower-case governments should error (@test_spellcheck.R#72)  ───
  `check_spelling("./spelling/Govt/WAgovt.tex")` threw an error with unexpected message.
  Expected match: "uppercase G"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 48. Error: Some lower-case governments should not (@test_spellcheck.R#76)  ──
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./spelling/Govt/ok-as-adj.tex")) at testthat/test_spellcheck.R:76
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./spelling/Govt/ok-as-adj.tex")
  5: parse_tex(lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 49. Error: 'percent' error should only occur in a Grattan report (@test_spell
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling(percent_spellcheck.tex)) at testthat/test_spellcheck.R:91
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling(percent_spellcheck.tex)
  5: parse_tex(lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 50. Error: Includepdf doesn't result in a failed include message (@test_spell
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./spelling/includepdf-ok.tex")) at testthat/test_spellcheck.R:95
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./spelling/includepdf-ok.tex")
  5: inputs_of(filename)
  6: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs) %>% 
         rbindlist
  7: eval(lhs, parent, parent)
  8: eval(lhs, parent, parent)
  9: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs)
  10: FUN(X[[i]], ...)
  11: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  12: parse_tex(tex_lines)
  13: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  14: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 51. Failure: Should error (@test_spellcheck.R#99)  ──────────────────────────
  `check_spelling("spelling/misc-error.tex")` threw an error with unexpected message.
  Expected match: "Spellcheck"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 52. Failure: Should error (@test_spellcheck.R#100)  ─────────────────────────
  `check_spelling("spelling/typo-suggest.tex")` threw an error with unexpected message.
  Expected match: "Spellcheck"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 53. Error: Inputs should respect dict_lang at top level (@test_spellcheck.R#1
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("spelling/dict-lang-input/root.tex", dict_lang = "en_US")) at testthat/test_spellcheck.R:113
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("spelling/dict-lang-input/root.tex", dict_lang = "en_US")
  5: inputs_of(filename)
  6: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs) %>% 
         rbindlist
  7: eval(lhs, parent, parent)
  8: eval(lhs, parent, parent)
  9: lapply(c("input", "include"), extract_LaTeX_argument, tex_lines = lines_with_possible_inputs)
  10: FUN(X[[i]], ...)
  11: extract_mandatory_LaTeX_argument(tex_lines = tex_lines, command_name = command_name, 
         n = n)
  12: parse_tex(tex_lines)
  13: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  14: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ── 54. Failure: Bills of Parliament (@test_validate_bibliography.R#4)  ─────────
  `validate_bibliography(file = "./validate-bib/invalid-Bill.bib")` threw an error with unexpected message.
  Expected match: "Bills? of Parliament"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 55. Error: Bills of Parliament (@test_validate_bibliography.R#6)  ───────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(validate_bibliography(file = "./validate-bib/valid-Bill.bib")) at testthat/test_validate_bibliography.R:6
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: validate_bibliography(file = "./validate-bib/valid-Bill.bib")
  5: data.table(text = just_key_journal_urls) %>% .[, `:=`(entry_no, cumsum(grepl("^@", 
         text)))] %>% .[, `:=`(is_article, any(grepl("^@Article", text))), by = entry_no] %>% 
         .[, `:=`(both_url_and_journal, .N == 4L), by = entry_no] %>% .[, `:=`(is_newspaper, 
         any(grepl(newspapers_pattern, text, perl = TRUE))), by = entry_no] %>% .[is_article & 
         both_url_and_journal & is_newspaper] %>% .[, .(key = grep("^@Article", text, 
         perl = TRUE, value = TRUE), url = gsub("^url.*[{](.*)[}],?$", "\\1", text[grepl("^url", 
         text, perl = TRUE)], perl = TRUE), journal_actual = gsub("^journal.*[{](.*)[}],?$", 
         "\\1", text[grepl("^journal", text, perl = TRUE)], perl = TRUE), journal_from_url = gsub(paste0("^.*(", 
         newspapers_pattern, ").*$"), "\\3", text[grepl("^url", text, perl = TRUE)], perl = TRUE)), 
         by = entry_no] %>% setkey(journal_from_url) %>% .[newspaper_by_url]
  6: withVisible(eval(quote(`_fseq`(`_lhs`)), env, env))
  7: eval(quote(`_fseq`(`_lhs`)), env, env)
  8: eval(quote(`_fseq`(`_lhs`)), env, env)
  9: `_fseq`(`_lhs`)
  10: freduce(value, `_function_list`)
  11: function_list[[i]](value)
  12: .[, `:=`(is_article, any(grepl("^@Article", text))), by = entry_no]
  13: `[.data.table`(., , `:=`(is_article, any(grepl("^@Article", text))), by = entry_no)
  
  ── 56. Failure: Duplicate fields noticed (@test_validate_bibliography.R#10)  ───
  `any_bib_duplicates("./validate-bib/dup_fields.bib")` threw an error with unexpected message.
  Expected match: "Duplicate fields found in RMS2010Hunter"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 57. Failure: Duplicate entries error (@test_validate_bibliography.R#15)  ────
  `any_bib_duplicates("./validate-bib/dup_entries.bib")` threw an error with unexpected message.
  Expected match: "[Dd]uplicate entries in bibliography"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 58. Failure: Duplicate entries error (@test_validate_bibliography.R#17)  ────
  `any_bib_duplicates("./validate-bib/dup_entries-2.bib")` threw an error with unexpected message.
  Expected match: "[Dd]uplicate entries in bibliography"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
      line_no
   1:       2
   2:       3
   3:       4
   4:       5
   5:       6
   6:      10
   7:      11
   8:      12
   9:      13
  10:      14
  11:       1
  12:       9
                                                                                                                                                x
   1:                                                                                                                 author     \t{Alan Davies},
   2:                                                                                                                  date       \t{2016-03-08},
   3:                                                                         title      \t{Melbourne Metro: what do you get for \\$10~Billion?},
   4:                                                                                                       journal    \t{The Urbanist (Crikey)},
   5:                          url        \t{https://blogs.crikey.com.au/theurbanist/2016/03/08/melbourne-metro-what-do-you-get-for-10-billion/},
   6:                                                                                                              author     \t{Marion Terrill},
   7:                                                                                                                  date       \t{2017-07-03},
   8:                                  title      \t{Stuck in traffic: busting Melbourne versus Sydney myths and identifying the worst commutes},
   9:                                                                                                            journal    \t{The Conversation},
  10: url        \t{https://theconversation.com/stuck-in-traffic-busting-melbourne-versus-sydney-myths-and-identifying-the-worst-commutes-79343},
  11:                                                                                     key\tArticle{Terrill-2017-theConvo-Melbourne-vs-Sydney,
  12:                                                                                     key\tArticle{Terrill-2017-theConvo-Melbourne-vs-Sydney,
            field
   1: author     
   2: date       
   3: title      
   4: journal    
   5: url        
   6: author     
   7: date       
   8: title      
   9: journal    
  10: url        
  11:         key
  12:         key
                                                                                                                               value
   1:                                                                                                                 {Alan Davies},
   2:                                                                                                                  {2016-03-08},
   3:                                                                         {Melbourne Metro: what do you get for \\$10~Billion?},
   4:                                                                                                       {The Urbanist (Crikey)},
   5:                          {https://blogs.crikey.com.au/theurbanist/2016/03/08/melbourne-metro-what-do-you-get-for-10-billion/},
   6:                                                                                                              {Marion Terrill},
   7:                                                                                                                  {2017-07-03},
   8:                                  {Stuck in traffic: busting Melbourne versus Sydney myths and identifying the worst commutes},
   9:                                                                                                            {The Conversation},
  10: {https://theconversation.com/stuck-in-traffic-busting-melbourne-versus-sydney-myths-and-identifying-the-worst-commutes-79343},
  11:                                                                             Article{Terrill-2017-theConvo-Melbourne-vs-Sydney,
  12:                                                                             Article{Terrill-2017-theConvo-Melbourne-vs-Sydney,
      is_key                                  key_value
   1:  FALSE                                       <NA>
   2:  FALSE                                       <NA>
   3:  FALSE                                       <NA>
   4:  FALSE                                       <NA>
   5:  FALSE                                       <NA>
   6:  FALSE                                       <NA>
   7:  FALSE                                       <NA>
   8:  FALSE                                       <NA>
   9:  FALSE                                       <NA>
  10:  FALSE                                       <NA>
  11:   TRUE terrill-2017-theconvo-melbourne-vs-sydney,
  12:   TRUE terrill-2017-theconvo-melbourne-vs-sydney,
                        bib_file
   1: ./validate-bib/dup-key.bib
   2: ./validate-bib/dup-key.bib
   3: ./validate-bib/dup-key.bib
   4: ./validate-bib/dup-key.bib
   5: ./validate-bib/dup-key.bib
   6: ./validate-bib/dup-key.bib
   7: ./validate-bib/dup-key.bib
   8: ./validate-bib/dup-key.bib
   9: ./validate-bib/dup-key.bib
  10: ./validate-bib/dup-key.bib
  11: ./validate-bib/dup-key.bib
  12: ./validate-bib/dup-key.bib
  ── 59. Failure: Near-duplicate authors (@test_validate_bibliography.R#32)  ─────
  `any_bib_duplicates("validate-bib/near-dup-authors.bib", report2console)` threw an error with unexpected message.
  Expected match: "Same author used with inconsistent.*case"
  Actual message: "SETLENGTH() cannot be applied to an ALTVEC object."
  
  ── 60. Error: With check_spelling (@test_veto_sic.R#62)  ───────────────────────
  SETLENGTH() cannot be applied to an ALTVEC object.
  1: expect_null(check_spelling("./spelling/sic/sic-vetoes.tex")) at testthat/test_veto_sic.R:62
  2: quasi_label(enquo(object), label)
  3: eval_bare(get_expr(quo), get_env(quo))
  4: check_spelling("./spelling/sic/sic-vetoes.tex")
  5: parse_tex(lines)
  6: out[tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", tgj)]
  7: `[.data.table`(out, tex_group == j, `:=`((GROUP_IDj), .GRP), by = c("optional_tex_group", 
         tgj))
  
  ══ testthat results  ═══════════════════════════════════════════════════════════
  OK: 139 SKIPPED: 9 FAILED: 60
  1. Error: Locations (@test-locate_latex_argument.R#5) 
  2. Error: Extract textbf (@test_extract_LaTeX_argument.R#4) 
  3. Error: Extract textcites (@test_extract_LaTeX_argument.R#11) 
  4. Error: Extract nested (@test_extract_LaTeX_argument.R#18) 
  5. Error: Optional argument (@test_extract_LaTeX_argument.R#32) 
  6. Error: Multi-line starred (@test_extract_LaTeX_argument.R#58) 
  7. Error: Multi-line (@test_extract_LaTeX_argument.R#78) 
  8. Error: Optional argument interference (@test_extract_LaTeX_argument.R#107) 
  9. Error: Multi-lines (@test_extract_LaTeX_argument.R#120) 
  1. ...
  
  Error: testthat unit tests failed
  Execution halted