Running 'testthat.R' [10s]
Running the tests in 'tests/testthat.R' failed.
Complete output:
  > library(testthat)
  > library(potools)
  > 
  > # Failed on Solaris because the command-line tools are missing there (which means tools doesn't work there), #186
  > if (isTRUE(check_potools_sys_reqs())) {
  +   test_check("potools")
  + } else {
  +   writeLines("Skipping tests on system without gettext installed")
  + }
  Saving _problems/test-diagnostics-5.R
  Saving _problems/test-diagnostics-86.R
  Saving _problems/test-get-message-data-5.R
  Saving _problems/test-get-message-data-35.R
  Saving _problems/test-get-message-data-71.R
  Saving _problems/test-get-message-data-106.R
  Saving _problems/test-get-message-data-129.R
  Saving _problems/test-po_compile-23.R
  Starting translations for package 'noMsg'
  Getting R-level messages...
  Starting translations for package 'rDataPkg'
  Saving _problems/test-write-po-file-29.R
  [ FAIL 24 | WARN 0 | SKIP 1 | PASS 45 ]
  
  ══ Skipped tests (1) ═══════════════════════════════════════════════════════════
  • On CRAN (1): 'test-po_create.R:1:1'
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-diagnostics.R:5:3'): translate_package works on package with 'cracked' messages needing templates ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─potools::get_message_data(test_package("r_non_template")) at test-diagnostics.R:5:3
   2.   └─potools:::get_r_messages(...)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-diagnostics.R:86:3'): Diagnostic for unmarked src translations works ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─potools::get_message_data(test_package("r_src_untranslated")) at test-diagnostics.R:86:3
   2.   └─potools:::get_r_messages(...)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-get-message-data.R:2:3'): Packages with src code & C syntax errors fail gracefully ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-get-message-data.R:2:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─potools::get_message_data(test_package("r_src_err_1"))
    8.   └─potools:::get_r_messages(...)
    9.     ├─...[]
   10.     └─data.table:::`[.data.table`(...)
  ── Error ('test-get-message-data.R:29:3'): Custom translation functions work in R and src ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─potools::get_message_data(...) at test-get-message-data.R:29:3
   2.   └─potools:::get_r_messages(...)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  ── Error ('test-get-message-data.R:65:3'): faulty custom_translation_functions specs error ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─testthat::expect_error(...) at test-get-message-data.R:65:3
    2. │ └─testthat:::expect_condition_matching_(...)
    3. │   └─testthat:::quasi_capture(...)
    4. │     ├─testthat (local) .capture(...)
    5. │     │ └─base::withCallingHandlers(...)
    6. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
    7. └─potools::get_message_data(...)
    8.   └─potools:::get_r_messages(...)
    9.     ├─...[]
   10.     └─data.table:::`[.data.table`(...)
  ── Error ('test-get-message-data.R:102:3'): Message exclusions are respected ───
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─potools:::expect_all_match(...) at test-get-message-data.R:102:3
   2. │ └─base::vapply(...) at ./helpers.R:24:3
   3. │   └─potools (local) FUN(X[[i]], ...)
   4. │     └─base::grep(target, inputs, ..., invert = invert) at ./helpers.R:26:5
   5. │       └─base::is.factor(x)
   6. └─potools::get_message_data(test_package("r_msg"))
   7.   └─potools:::get_r_messages(...)
   8.     ├─...[]
   9.     └─data.table:::`[.data.table`(...)
  ── Error ('test-get-message-data.R:129:3'): Pre-processor macros don't break parentheses matching ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─testthat::expect_identical(...) at test-get-message-data.R:129:3
   2. │ └─testthat::quasi_label(enquo(object), label)
   3. │   └─rlang::eval_bare(expr, quo_get_env(quo))
   4. └─potools::get_message_data(test_package("unusual_msg"))
   5.   └─potools:::get_r_messages(...)
   6.     ├─...[]
   7.     └─data.table:::`[.data.table`(...)
  ── Error ('test-po_compile.R:23:3'): po_compile() can handle UTF-8 msgstr ──────
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─potools::po_extract(temp) at test-po_compile.R:23:3
   2.   └─potools::get_message_data(...)
   3.     └─potools:::get_r_messages(...)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-po_update.R:5:3'): user is told what's happening ───────────────
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─potools::po_extract() at test-po_update.R:5:3
   2.   └─potools::get_message_data(...)
   3.     └─potools:::get_r_messages(...)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-po_update.R:20:3'): user is told what's happening ──────────────
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─potools::po_extract() at test-po_update.R:20:3
   2.   └─potools::get_message_data(...)
   3.     └─potools:::get_r_messages(...)
   4.       ├─...[]
   5.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:44:7'): translate_package works on a simple package ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─potools:::restore_package(...) at test-translate-package.R:41:3
    2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
    3. │   └─base::withVisible(...elt(i))
    4. ├─potools:::expect_messages(...) at test-translate-package.R:44:7
    5. │ └─testthat::capture_messages(expr) at ./helpers.R:45:3
    6. │   └─base::withCallingHandlers(...)
    7. └─potools::translate_package(pkg, verbose = TRUE)
    8.   └─potools::get_message_data(...)
    9.     └─potools:::get_r_messages(...)
   10.       ├─...[]
   11.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:110:7'): translate_package works on package with outdated (fuzzy) translations ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─potools:::restore_package(...) at test-translate-package.R:106:3
    2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
    3. │   └─base::withVisible(...elt(i))
    4. ├─potools:::expect_messages(...) at test-translate-package.R:110:7
    5. │ └─testthat::capture_messages(expr) at ./helpers.R:45:3
    6. │   └─base::withCallingHandlers(...)
    7. └─potools::translate_package(pkg, "zh_CN", verbose = TRUE)
    8.   └─potools::get_message_data(...)
    9.     └─potools:::get_r_messages(...)
   10.       ├─...[]
   11.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:126:7'): translate_package identifies potential translations in cat() calls ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─potools:::restore_package(...) at test-translate-package.R:122:3
    2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
    3. │   └─base::withVisible(...elt(i))
    4. ├─potools:::expect_messages(...) at test-translate-package.R:126:7
    5. │ └─testthat::capture_messages(expr) at ./helpers.R:45:3
    6. │   └─base::withCallingHandlers(...)
    7. └─potools::translate_package(pkg, "zh_CN")
    8.   └─potools::get_message_data(...)
    9.     └─potools:::get_r_messages(...)
   10.       ├─...[]
   11.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:154:7'): Unknown language flow works correctly ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─potools:::restore_package(...) at test-translate-package.R:150:3
    2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
    3. │   └─base::withVisible(...elt(i))
    4. ├─potools:::expect_messages(...) at test-translate-package.R:154:7
    5. │ └─testthat::capture_messages(expr) at ./helpers.R:45:3
    6. │   └─base::withCallingHandlers(...)
    7. └─potools::translate_package(pkg, "cy")
    8.   └─potools::get_message_data(...)
    9.     └─potools:::get_r_messages(...)
   10.       ├─...[]
   11.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:207:7'): Erroneous messages stop get_specials_metadata ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─potools:::restore_package(...) at test-translate-package.R:203:3
    2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
    3. │   └─base::withVisible(...elt(i))
    4. ├─testthat::expect_error(...) at test-translate-package.R:207:7
    5. │ └─testthat:::expect_condition_matching_(...)
    6. │   └─testthat:::quasi_capture(...)
    7. │     ├─testthat (local) .capture(...)
    8. │     │ └─base::withCallingHandlers(...)
    9. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─potools::translate_package(pkg, "zh_CN", diagnostics = NULL)
   11.   └─potools::get_message_data(...)
   12.     └─potools:::get_r_messages(...)
   13.       ├─...[]
   14.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:231:7'): Packages with src code work correctly ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─potools:::restore_package(...) at test-translate-package.R:227:3
   2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
   3. │   └─base::withVisible(...elt(i))
   4. └─potools::translate_package(pkg, "zh_CN", diagnostics = check_untranslated_src) at test-translate-package.R:231:7
   5.   └─potools::get_message_data(...)
   6.     └─potools:::get_r_messages(...)
   7.       ├─...[]
   8.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:301:7'): Packages with src code & fuzzy messages work ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─potools:::restore_package(...) at test-translate-package.R:297:3
    2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
    3. │   └─base::withVisible(...elt(i))
    4. ├─potools:::expect_messages(...) at test-translate-package.R:301:7
    5. │ └─testthat::capture_messages(expr) at ./helpers.R:45:3
    6. │   └─base::withCallingHandlers(...)
    7. └─potools::translate_package(pkg, "zh_CN", verbose = TRUE)
    8.   └─potools::get_message_data(...)
    9.     └─potools:::get_r_messages(...)
   10.       ├─...[]
   11.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:320:7'): Various edge cases in retrieving/outputting messages in R files are handled ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─potools:::restore_package(...) at test-translate-package.R:317:3
   2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
   3. │   └─base::withVisible(...elt(i))
   4. └─potools::translate_package(pkg, diagnostics = NULL) at test-translate-package.R:320:7
   5.   └─potools::get_message_data(...)
   6.     └─potools:::get_r_messages(...)
   7.       ├─...[]
   8.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:388:7'): use_base_rules=FALSE produces our preferred behavior ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─potools:::restore_package(...) at test-translate-package.R:384:3
   2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
   3. │   └─base::withVisible(...elt(i))
   4. └─potools::translate_package(...) at test-translate-package.R:388:7
   5.   └─potools::get_message_data(...)
   6.     └─potools:::get_r_messages(...)
   7.       ├─...[]
   8.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:428:7'): use_base_rules=TRUE produces base-aligned behavior ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─potools:::restore_package(...) at test-translate-package.R:424:3
   2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
   3. │   └─base::withVisible(...elt(i))
   4. └─potools::translate_package(...) at test-translate-package.R:428:7
   5.   └─potools::get_message_data(...)
   6.     └─potools:::get_r_messages(...)
   7.       ├─...[]
   8.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:473:7'): use_base_rules is auto-detected ───
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─potools:::restore_package(...) at test-translate-package.R:470:3
   2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
   3. │   └─base::withVisible(...elt(i))
   4. └─potools::translate_package(pkg, diagnostics = NULL) at test-translate-package.R:473:7
   5.   └─potools::get_message_data(...)
   6.     └─potools:::get_r_messages(...)
   7.       ├─...[]
   8.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:528:7'): translation of 'base' works correctly ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
       ▆
    1. ├─potools:::restore_package(...) at test-translate-package.R:509:3
    2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
    3. │   └─base::withVisible(...elt(i))
    4. ├─testthat::expect_error(...) at test-translate-package.R:528:7
    5. │ └─testthat:::expect_condition_matching_(...)
    6. │   └─testthat:::quasi_capture(...)
    7. │     ├─testthat (local) .capture(...)
    8. │     │ └─base::withCallingHandlers(...)
    9. │     └─rlang::eval_bare(quo_get_expr(.quo), quo_get_env(.quo))
   10. └─potools::translate_package(pkg, diagnostics = NULL)
   11.   └─potools::get_message_data(...)
   12.     └─potools:::get_r_messages(...)
   13.       ├─...[]
   14.       └─data.table:::`[.data.table`(...)
  ── Error ('test-translate-package.R:562:7'): max_translations works as expected ──
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. ├─potools:::restore_package(...) at test-translate-package.R:558:3
   2. │ └─utils::capture.output(expr) at ./helpers.R:19:3
   3. │   └─base::withVisible(...elt(i))
   4. └─potools::translate_package(...) at test-translate-package.R:562:7
   5.   └─potools::get_message_data(...)
   6.     └─potools:::get_r_messages(...)
   7.       ├─...[]
   8.       └─data.table:::`[.data.table`(...)
  ── Error ('test-write-po-file.R:29:3'): write_po_file works ────────────────────
  Error in ``[.data.table`(msg, , by = c("file", "line1", "col1", "line2", "col2"), `:=`(call, build_call(file_lines[[.BY$file]], comments[.(.BY$file, .BY$line1:.BY$line2), .SD, nomatch = NULL], params = .BY)))`: attempt access index 11/11 in VECTOR_ELT
  Backtrace:
      ▆
   1. └─potools::get_message_data(test_package("r-devel/src/library/base")) at test-write-po-file.R:29:3
   2.   └─potools:::get_r_messages(...)
   3.     ├─...[]
   4.     └─data.table:::`[.data.table`(...)
  
  [ FAIL 24 | WARN 0 | SKIP 1 | PASS 45 ]
  Error:
  ! Test failures.
  Execution halted