Running ‘testthat.R’ [8s/13s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(poio)
  > 
  > # Can't compare po object directly using
  > # expect_identical(po1, po2) due to
  > # https://github.com/hadley/dplyr/issues/2194
  > # testthat also not informative on where differences in tibble are
  > # so roll custom solution.
  > 
  > expect_po_equal <- function(actual, expected, check_po_revision_date = FALSE) {
  +   expect_identical(actual$source_type, expected$source_type)
  +   expect_identical(actual$file_type, expected$file_type)
  +   expect_identical(actual$initial_comments, expected$initial_comments)
  +   expect_identical(actual$initial_comments, expected$initial_comments)
  + 
  +   if(check_po_revision_date) {
  +     # PO-Revision-Date is set to the current time.
  +     # Fake the value, then check that separately.
  +     actual_po_revision_date <- with(actual$metadata, value[name == "PO-Revision-Date"])
  +     actual$metadata <- within(
  +       actual$metadata,
  +       value[name == "PO-Revision-Date"] <- "DUMMY VALUE"
  +     )
  +     date_format <- "%Y-%m-%d %H:%M:%S%z"
  +     expect_match(actual_po_revision_date, rebus.datetimes::datetime(date_format))
  +     expect_lt(
  +       as.numeric(
  +         difftime(
  +           Sys.time(),
  +           strptime(actual_po_revision_date, date_format),
  +           units = "secs"
  +         )
  +       ),
  +       30
  +     )
  +   }
  + 
  +   # Avoid tibble mess by converting tibble
  +   # to data.frames before comparing
  +   actual_metadata <- as.data.frame(actual$metadata)
  +   expected_metadata <- as.data.frame(expected$metadata)
  +   metadata_info <- get_difference_info(actual$metadata, expected$metadata)
  +   expect_equal(actual_metadata, expected_metadata, info = metadata_info)
  +   actual_direct <- as.data.frame(actual$direct)
  +   expected_direct <- as.data.frame(expected$direct)
  +   direct_info <- get_difference_info(actual$direct, expected$direct)
  +   expect_equal(actual_direct, expected_direct, info = direct_info)
  +   actual_countable <- as.data.frame(actual$countable)
  +   expected_countable <- as.data.frame(expected$countable)
  +   countable_info <- get_difference_info(actual$countable, expected$countable)
  +   expect_equal(actual_countable, expected_countable, info = countable_info)
  + }
  > 
  > flatten <- function(d) {
  +   d[] <- lapply(
  +     colnames(d),
  +     function(colname) {
  +       vapply(d[[colname]], toString, character(1))
  +     }
  +   )
  +   d
  + }
  > 
  > get_difference_info <- function(d1, d2) {
  +   fd1 <- flatten(d1)
  +   fd2 <- flatten(d2)
  +   diffs12 <- dplyr::anti_join(fd1, fd2)
  +   diffs21 <- dplyr::anti_join(fd2, fd1)
  +   diffs_both <- cbind(actual = diffs12, expected = diffs21)
  +   assertive.base::print_and_capture(diffs_both)
  + }
  > 
  > test_check("poio")
  [ FAIL 3 | WARN 1 | SKIP 0 | PASS 33 ]
  
  ══ Failed tests ════════════════════════════════════════════════════════════════
  ── Error ('test-empty.R:105:5'): fix_metadata works on an empty pot file ───────
  Error in `vectbl_assign(x[[j]], i, recycled_value[[j]])`: DLL requires the use of native symbols
  Backtrace:
       ▆
    1. ├─poio::fix_metadata(pot, pkg) at test-empty.R:105:4
    2. ├─poio:::fix_metadata.po(pot, pkg)
    3. │ ├─poio::fix_metadata(...)
    4. │ └─poio:::fix_metadata.data.frame(...)
    5. │   └─... %>% ...
    6. ├─poio:::fix_content_transfer_encoding(., .dots[["Content-Transfer-Encoding"]])
    7. │ └─poio:::fix_field(x, "Content-Transfer-Encoding", expected = expected)
    8. │   └─... %>% extract2(1)
    9. ├─dplyr::select(., .data$value)
   10. ├─dplyr::filter(., .data$name == po_field)
   11. ├─poio:::fix_content_type(., .dots[["Content-Type"]])
   12. │ └─poio:::fix_field(x, "Content-Type", expected = expected)
   13. │   └─... %>% extract2(1)
   14. ├─dplyr::select(., .data$value)
   15. ├─dplyr::filter(., .data$name == po_field)
   16. ├─poio:::fix_mime_version(., .dots[["MIME-Version"]])
   17. │ └─poio:::fix_field(x, "MIME-Version", expected = expected)
   18. │   └─... %>% extract2(1)
   19. ├─dplyr::select(., .data$value)
   20. ├─dplyr::filter(., .data$name == po_field)
   21. ├─poio:::fix_language_team(., .dots[["Language-Team"]])
   22. │ └─poio:::fix_field(x, "Language-Team", expected = expected)
   23. │   └─... %>% extract2(1)
   24. ├─dplyr::select(., .data$value)
   25. ├─dplyr::filter(., .data$name == po_field)
   26. ├─poio:::fix_last_translator(., .dots[["Last-Translator"]])
   27. │ └─poio:::fix_field(x, "Last-Translator", expected = expected)
   28. │   └─... %>% extract2(1)
   29. ├─dplyr::select(., .data$value)
   30. ├─dplyr::filter(., .data$name == po_field)
   31. ├─poio:::fix_po_revision_date(., .dots[["PO-Revision-Date"]])
   32. │ └─poio:::fix_field(x, "PO-Revision-Date", expected = expected)
   33. │   └─... %>% extract2(1)
   34. ├─dplyr::select(., .data$value)
   35. ├─dplyr::filter(., .data$name == po_field)
   36. ├─poio:::fix_report_msgid_bugs_to(., pkg, .dots[["Report-Msgid-Bugs-To"]])
   37. │ └─poio:::fix_field(x, "Report-Msgid-Bugs-To", expected, pkg, "BugReports")
   38. │   └─... %>% extract2(1)
   39. ├─dplyr::select(., .data$value)
   40. ├─dplyr::filter(., .data$name == po_field)
   41. └─poio:::fix_metadata_project_id_version(., pkg, .dots[["Project-Id-Version"]])
   42.   └─poio:::fix_field(...)
   43.     ├─base::`[<-`(`*tmp*`, x$name == po_field, "value", value = `<chr>`)
   44.     └─tibble:::`[<-.tbl_df`(`*tmp*`, x$name == po_field, "value", value = `<chr>`)
   45.       └─tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
   46.         └─tibble:::tbl_subassign_row(xj, i, value, i_arg, value_arg, call)
   47.           ├─base::withCallingHandlers(...)
   48.           └─tibble:::vectbl_assign(x[[j]], i, recycled_value[[j]])
  ── Error ('test-empty.R:164:5'): fix_metadata works with user-specified metadata ──
  Error in `vectbl_assign(x[[j]], i, recycled_value[[j]])`: DLL requires the use of native symbols
  Backtrace:
       ▆
    1. ├─poio::fix_metadata(...) at test-empty.R:164:4
    2. ├─poio:::fix_metadata.po(...)
    3. │ ├─poio::fix_metadata(...)
    4. │ └─poio:::fix_metadata.data.frame(...)
    5. │   └─... %>% ...
    6. ├─poio:::fix_content_transfer_encoding(., .dots[["Content-Transfer-Encoding"]])
    7. │ └─poio:::fix_field(x, "Content-Transfer-Encoding", expected = expected)
    8. │   └─... %>% extract2(1)
    9. ├─dplyr::select(., .data$value)
   10. ├─dplyr::filter(., .data$name == po_field)
   11. ├─poio:::fix_content_type(., .dots[["Content-Type"]])
   12. │ └─poio:::fix_field(x, "Content-Type", expected = expected)
   13. │   └─... %>% extract2(1)
   14. ├─dplyr::select(., .data$value)
   15. ├─dplyr::filter(., .data$name == po_field)
   16. ├─poio:::fix_mime_version(., .dots[["MIME-Version"]])
   17. │ └─poio:::fix_field(x, "MIME-Version", expected = expected)
   18. │   └─... %>% extract2(1)
   19. ├─dplyr::select(., .data$value)
   20. ├─dplyr::filter(., .data$name == po_field)
   21. ├─poio:::fix_language_team(., .dots[["Language-Team"]])
   22. │ └─poio:::fix_field(x, "Language-Team", expected = expected)
   23. │   └─... %>% extract2(1)
   24. ├─dplyr::select(., .data$value)
   25. ├─dplyr::filter(., .data$name == po_field)
   26. ├─poio:::fix_last_translator(., .dots[["Last-Translator"]])
   27. │ └─poio:::fix_field(x, "Last-Translator", expected = expected)
   28. │   └─... %>% extract2(1)
   29. ├─dplyr::select(., .data$value)
   30. ├─dplyr::filter(., .data$name == po_field)
   31. ├─poio:::fix_po_revision_date(., .dots[["PO-Revision-Date"]])
   32. │ └─poio:::fix_field(x, "PO-Revision-Date", expected = expected)
   33. │   └─... %>% extract2(1)
   34. ├─dplyr::select(., .data$value)
   35. ├─dplyr::filter(., .data$name == po_field)
   36. ├─poio:::fix_report_msgid_bugs_to(., pkg, .dots[["Report-Msgid-Bugs-To"]])
   37. │ └─poio:::fix_field(x, "Report-Msgid-Bugs-To", expected, pkg, "BugReports")
   38. │   └─... %>% extract2(1)
   39. ├─dplyr::select(., .data$value)
   40. ├─dplyr::filter(., .data$name == po_field)
   41. └─poio:::fix_metadata_project_id_version(., pkg, .dots[["Project-Id-Version"]])
   42.   └─poio:::fix_field(...)
   43.     ├─base::`[<-`(`*tmp*`, x$name == po_field, "value", value = `<chr>`)
   44.     └─tibble:::`[<-.tbl_df`(`*tmp*`, x$name == po_field, "value", value = `<chr>`)
   45.       └─tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
   46.         └─tibble:::tbl_subassign_row(xj, i, value, i_arg, value_arg, call)
   47.           ├─base::withCallingHandlers(...)
   48.           └─tibble:::vectbl_assign(x[[j]], i, recycled_value[[j]])
  ── Error ('test-summerof69.R:225:5'): fix_metadata works on a complicated POT file ──
  Error in `vectbl_assign(x[[j]], i, recycled_value[[j]])`: DLL requires the use of native symbols
  Backtrace:
       ▆
    1. ├─poio::fix_metadata(pot, pkg) at test-summerof69.R:225:4
    2. ├─poio:::fix_metadata.po(pot, pkg)
    3. │ ├─poio::fix_metadata(...)
    4. │ └─poio:::fix_metadata.data.frame(...)
    5. │   └─... %>% ...
    6. ├─poio:::fix_content_transfer_encoding(., .dots[["Content-Transfer-Encoding"]])
    7. │ └─poio:::fix_field(x, "Content-Transfer-Encoding", expected = expected)
    8. │   └─... %>% extract2(1)
    9. ├─dplyr::select(., .data$value)
   10. ├─dplyr::filter(., .data$name == po_field)
   11. ├─poio:::fix_content_type(., .dots[["Content-Type"]])
   12. │ └─poio:::fix_field(x, "Content-Type", expected = expected)
   13. │   └─... %>% extract2(1)
   14. ├─dplyr::select(., .data$value)
   15. ├─dplyr::filter(., .data$name == po_field)
   16. ├─poio:::fix_mime_version(., .dots[["MIME-Version"]])
   17. │ └─poio:::fix_field(x, "MIME-Version", expected = expected)
   18. │   └─... %>% extract2(1)
   19. ├─dplyr::select(., .data$value)
   20. ├─dplyr::filter(., .data$name == po_field)
   21. ├─poio:::fix_language_team(., .dots[["Language-Team"]])
   22. │ └─poio:::fix_field(x, "Language-Team", expected = expected)
   23. │   └─... %>% extract2(1)
   24. ├─dplyr::select(., .data$value)
   25. ├─dplyr::filter(., .data$name == po_field)
   26. ├─poio:::fix_last_translator(., .dots[["Last-Translator"]])
   27. │ └─poio:::fix_field(x, "Last-Translator", expected = expected)
   28. │   └─... %>% extract2(1)
   29. ├─dplyr::select(., .data$value)
   30. ├─dplyr::filter(., .data$name == po_field)
   31. ├─poio:::fix_po_revision_date(., .dots[["PO-Revision-Date"]])
   32. │ └─poio:::fix_field(x, "PO-Revision-Date", expected = expected)
   33. │   └─... %>% extract2(1)
   34. ├─dplyr::select(., .data$value)
   35. ├─dplyr::filter(., .data$name == po_field)
   36. ├─poio:::fix_report_msgid_bugs_to(., pkg, .dots[["Report-Msgid-Bugs-To"]])
   37. │ └─poio:::fix_field(x, "Report-Msgid-Bugs-To", expected, pkg, "BugReports")
   38. │   └─... %>% extract2(1)
   39. ├─dplyr::select(., .data$value)
   40. ├─dplyr::filter(., .data$name == po_field)
   41. └─poio:::fix_metadata_project_id_version(., pkg, .dots[["Project-Id-Version"]])
   42.   └─poio:::fix_field(...)
   43.     ├─base::`[<-`(`*tmp*`, x$name == po_field, "value", value = `<chr>`)
   44.     └─tibble:::`[<-.tbl_df`(`*tmp*`, x$name == po_field, "value", value = `<chr>`)
   45.       └─tibble:::tbl_subassign(x, i, j, value, i_arg, j_arg, substitute(value))
   46.         └─tibble:::tbl_subassign_row(xj, i, value, i_arg, value_arg, call)
   47.           ├─base::withCallingHandlers(...)
   48.           └─tibble:::vectbl_assign(x[[j]], i, recycled_value[[j]])
  
  [ FAIL 3 | WARN 1 | SKIP 0 | PASS 33 ]
  Error: Test failures
  Execution halted