Last updated on 2026-11-20 12:55:42 CET.
| Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
|---|---|---|---|---|---|---|
| r-devel-linux-x86_64-debian-clang | 1.5.0 | 16.66 | 290.70 | 307.36 | OK | |
| r-devel-linux-x86_64-debian-gcc | 1.5.0 | 10.23 | 200.88 | 211.11 | ERROR | |
| r-devel-linux-x86_64-fedora-clang | 1.5.0 | 13.00 | 211.84 | 224.84 | ERROR | |
| r-devel-linux-x86_64-fedora-gcc | 1.5.0 | 12.00 | 212.49 | 224.49 | ERROR | |
| r-devel-windows-x86_64 | 1.5.0 | 17.00 | 317.00 | 334.00 | OK | |
| r-patched-linux-x86_64 | 1.5.0 | 15.31 | 280.80 | 296.11 | OK | |
| r-release-linux-x86_64 | 1.5.0 | 15.99 | 277.74 | 293.73 | OK | |
| r-release-macos-arm64 | 1.5.0 | 3.00 | 56.00 | 59.00 | OK | |
| r-release-macos-x86_64 | 1.5.0 | 10.00 | 186.00 | 196.00 | OK | |
| r-release-windows-x86_64 | 1.5.0 | 28.00 | 320.00 | 348.00 | OK | |
| r-oldrel-macos-arm64 | 1.5.0 | 3.00 | 55.00 | 58.00 | OK | |
| r-oldrel-macos-x86_64 | 1.5.0 | 10.00 | 291.00 | 301.00 | OK | |
| r-oldrel-windows-x86_64 | 1.5.0 | 26.00 | 366.00 | 392.00 | OK |
Version: 1.5.0
Check: R code for possible problems
Result: NOTE
wrap_built_in_tools : <anonymous>: no visible global function
definition for ‘BtwToolBuiltIn’
Undefined global functions or variables:
BtwToolBuiltIn
Flavors: r-devel-linux-x86_64-debian-gcc, r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Version: 1.5.0
Check: examples
Result: ERROR
Running examples in ‘btw-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: btw_tool_docs_package_news
> ### Title: Tool: Package Release Notes
> ### Aliases: btw_tool_docs_package_news
>
> ### ** Examples
>
> ## Don't show:
> if (rmarkdown::pandoc_available()) withAutoprint({ # examplesIf
+ ## End(Don't show)
+ # Copy release notes to the clipboard for use in any AI app
+ btw("@news dplyr", clipboard = FALSE)
+
+ btw("@news dplyr join_by", clipboard = FALSE)
+
+ if (interactive()) { # can be slow
+ if (R.version$major == 4 && R.version$minor > "2.0") {
+ # Search through R's release notes.
+ # This should find a NEWS entry from R 4.2
+ btw("@news R dynamic rd content", clipboard = FALSE)
+ }
+ }
+
+ # Tool use by LLMs via ellmer or MCP ----
+ btw_tool_docs_package_news("dplyr")
+
+ btw_tool_docs_package_news("dplyr", "join_by")
+
+ # Read the NEWS entries for a specific installed package version
+ btw_tool_docs_package_news("dplyr", version = "1.1.4")
+ ## Don't show:
+ }) # examplesIf
> btw("@news dplyr", clipboard = FALSE)
## Context
### dplyr v1.2.1
- dplyr is now fully compliant with the R C API (#7819).
> btw("@news dplyr join_by", clipboard = FALSE)
Error in `.rlang_purrr_map_mold()`:
! Can't convert `.f`, a list, to a function.
Backtrace:
▆
1. ├─base::withAutoprint(...)
2. │ └─base::source(...)
3. │ ├─base::withVisible(eval(ei, envir))
4. │ └─base::eval(ei, envir)
5. │ └─base::eval(ei, envir)
6. └─btw::btw("@news dplyr join_by", clipboard = FALSE)
7. ├─btw::btw_this(...)
8. └─btw:::btw_this.environment(...)
9. └─btw:::btw_tool_env_describe_environment_impl(...)
10. └─btw:::map(...)
11. └─base::lapply(.x, .f, ...)
12. └─btw (local) FUN(X[[i]], ...)
13. ├─btw::btw_this(item, caller_env = environment)
14. └─btw:::btw_this.character(item, caller_env = environment)
15. └─btw:::dispatch_at_command(cmd, caller_env)
16. └─btw (local) btw_this_cmd(cmd$args)
17. ├─base::I(...)
18. │ └─base::unique.default(c("AsIs", oldClass(x)))
19. └─btw:::btw_tool_docs_package_news_impl(...)
20. └─btw:::package_news_search(...)
21. └─btw:::map_chr(news$HTML, extract_relevant_news, search_term = search_term)
22. └─btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
23. └─base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
24. └─btw (local) FUN(X[[i]], ...)
25. └─btw:::map_chr(all_elements[has_text], as.character)
26. └─btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
27. └─rlang::as_function(.f, env = global_env())
28. └─rlang:::abort_coercion(x, "a function", arg = arg, call = call)
29. └─rlang::abort(msg, call = call)
Execution halted
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.5.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [109s/65s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(btw)
>
> local_reproducible_output()
>
> test_check("btw")
Starting 2 test processes.
> test-btw_chat_history_store.R: Loading required package: shiny
Saving _problems/test-btw_this-32.R
Saving _problems/test-btw_this-109.R
Saving _problems/test-btw_this-116.R
Saving _problems/test-btw_this-121.R
Saving _problems/test-btw_this-470.R
Saving _problems/test-btw_this-520.R
Saving _problems/test-tool-docs-11.R
Saving _problems/test-tool-docs-100.R
Saving _problems/test-tool-docs-133.R
Saving _problems/test-tool-docs-150.R
Saving _problems/test-tool-docs-179.R
Saving _problems/test-tool-docs-228.R
Saving _problems/test-tool-docs-news-23.R
Saving _problems/test-tool-docs-news-57.R
Saving _problems/test-tool-docs-news-139.R
> test-tool-sessioninfo.R: Using model = "claude-sonnet-5-5".
Saving _problems/test-tool-run-598.R
[ FAIL 16 | WARN 2 | SKIP 154 | PASS 2081 ]
== Skipped tests (154) =========================================================
* BtwToolBuiltIn class not available (3): 'test-tools.R:122:3',
'test-tools.R:143:3', 'test-tools.R:162:3'
* On CRAN (66): 'test-btw.R:7:1', 'test-btw_client_app_slash_commands.R:98:1',
'test-btw_this.R:42:1', 'test-btw_this.R:474:3', 'test-btw_this.R:681:1',
'test-btw_this.R:698:1', 'test-clipboard.R:1:1', 'test-deprecated.R:19:3',
'test-deprecated.R:112:3', 'test-edit_btw_md.R:1:1',
'test-edit_btw_md.R:27:1', 'test-edit_btw_md.R:39:1',
'test-edit_btw_md.R:54:1', 'test-edit_btw_md.R:70:1',
'test-edit_btw_md.R:87:1', 'test-edit_btw_md.R:104:1',
'test-edit_btw_md.R:123:1', 'test-edit_btw_md.R:143:1',
'test-edit_btw_md.R:161:1', 'test-edit_btw_md.R:183:1',
'test-edit_btw_md.R:330:1', 'test-edit_btw_md.R:357:1',
'test-tool-cran.R:42:3', 'test-tool-cran.R:56:3', 'test-tool-docs.R:23:1',
'test-tool-docs.R:31:3', 'test-tool-docs.R:59:3', 'test-tool-docs.R:78:1',
'test-tool-env.R:15:1', 'test-tool-files-edit.R:280:1',
'test-tool-files-edit.R:313:1', 'test-tool-files-edit.R:351:1',
'test-tool-files-edit.R:382:1', 'test-tool-files-edit.R:412:1',
'test-tool-files-edit.R:449:1', 'test-tool-files-edit.R:491:1',
'test-tool-files-patch.R:416:1', 'test-tool-files-patch.R:441:1',
'test-tool-files-write.R:1:1', 'test-tool-git.R:1:1', 'test-tool-git.R:67:1',
'test-tool-git.R:107:1', 'test-tool-git.R:132:1', 'test-tool-git.R:166:1',
'test-tool-git.R:191:1', 'test-tool-git.R:214:1', 'test-tool-git.R:345:1',
'test-tool-ide.R:1:1', 'test-tool-pkg-devtools-covr.R:295:1',
'test-tool-pkg-src.R:3:1', 'test-tool-sessioninfo.R:3:1',
'test-tool-sessioninfo.R:40:1', 'test-tool-web.R:23:3',
'test-tool-web.R:54:3', 'test-tool-web.R:107:3', 'test-tool-web.R:128:3',
'test-tool-web.R:164:3', 'test-tool-web.R:206:1', 'test-tool-web.R:229:3',
'test-tool-run.R:195:1', 'test-tool_skills.R:1621:1',
'test-tool_skills.R:1691:1', 'test-utils-md.R:1:1', 'test-utils-md.R:5:1',
'test-utils-shinychat.R:10:1', 'test-utils.R:383:1'
* On Linux (21): 'test-btw.R:2:3', 'test-btw_client.R:33:5',
'test-btw_client.R:105:3', 'test-btw_client.R:259:5',
'test-btw_client.R:270:5', 'test-btw_client.R:352:5',
'test-btw_client.R:391:5', 'test-btw_this.R:4:3', 'test-btw_this.R:386:3',
'test-btw_this.R:422:3', 'test-tool-cran.R:23:3', 'test-tool-cran.R:74:3',
'test-tool-env-df.R:1:1', 'test-tool-env.R:2:3',
'test-tool-files-list.R:19:3', 'test-tool-files-read.R:43:3',
'test-tool-docs-news.R:187:3', 'test-tool-ide.R:177:3',
'test-tool-ide.R:199:3', 'test-tool_skills.R:1289:3', 'test-utils.R:7:3'
* btw CLI script not found (62): 'test-cli.R:51:3', 'test-cli.R:60:3',
'test-cli.R:69:3', 'test-cli.R:77:3', 'test-cli.R:84:3', 'test-cli.R:91:3',
'test-cli.R:100:3', 'test-cli.R:109:3', 'test-cli.R:115:3',
'test-cli.R:122:3', 'test-cli.R:131:3', 'test-cli.R:139:3',
'test-cli.R:148:3', 'test-cli.R:156:3', 'test-cli.R:167:3',
'test-cli.R:174:3', 'test-cli.R:192:3', 'test-cli.R:203:3',
'test-cli.R:214:3', 'test-cli.R:225:3', 'test-cli.R:233:3',
'test-cli.R:241:3', 'test-cli.R:253:3', 'test-cli.R:266:3',
'test-cli.R:274:3', 'test-cli.R:280:3', 'test-cli.R:297:3',
'test-cli.R:314:3', 'test-cli.R:335:3', 'test-cli.R:347:3',
'test-cli.R:358:3', 'test-cli.R:369:3', 'test-cli.R:387:3',
'test-cli.R:401:3', 'test-cli.R:407:3', 'test-cli.R:444:3',
'test-cli.R:509:3', 'test-cli.R:524:3', 'test-cli.R:531:3',
'test-cli.R:547:3', 'test-cli.R:552:3', 'test-cli.R:559:3',
'test-cli.R:571:3', 'test-cli.R:577:3', 'test-cli.R:596:3',
'test-cli.R:601:3', 'test-cli.R:609:3', 'test-cli.R:618:3',
'test-cli.R:631:3', 'test-cli.R:645:3', 'test-cli.R:666:3',
'test-cli.R:678:3', 'test-cli.R:696:3', 'test-cli.R:705:3',
'test-cli.R:713:3', 'test-cli.R:735:3', 'test-cli.R:747:3',
'test-cli.R:753:3', 'test-cli.R:764:3', 'test-cli.R:788:3',
'test-cli.R:816:3', 'test-cli.R:828:3'
* {bsicons} is not installed (1): 'test-tool-agent-custom.R:533:3'
* {phosphoricons} is not installed (1): 'test-tool-agent-custom.R:553:3'
== Failed tests ================================================================
-- Error ('test-btw_this.R:29:3'): btw_this.btw_docs_topic() -------------------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(`?`(dplyr::mutate)), btw_this("?dplyr::mutate")) at test-btw_this.R:29:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(`?`(dplyr::mutate))
5. \-btw:::btw_this.help_files_with_topic(`?`(dplyr::mutate))
6. \-btw:::btw_tool_docs_help_page_impl(...)
7. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
8. \-btw:::simplify_help_page_arguments(html)
9. \-btw:::map(...)
10. \-base::lapply(.x, .f, ...)
11. \-btw (local) FUN(X[[i]], ...)
12. +-base::paste(map_chr(children, as.character), collapse = "\n")
13. \-btw:::map_chr(children, as.character)
14. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
15. \-rlang::as_function(.f, env = global_env())
16. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
17. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:106:3'): @help command works with pkg::topic syntax --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this("@help dplyr::mutate"), btw_this("?dplyr::mutate")) at test-btw_this.R:106:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this("@help dplyr::mutate")
5. \-btw:::btw_this.character("@help dplyr::mutate")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(parts[1], parts[2]))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(parts[1], parts[2]))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:113:3'): @help command works with space-separated syntax --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this("@help dplyr mutate"), btw_this("?dplyr::mutate")) at test-btw_this.R:113:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this("@help dplyr mutate")
5. \-btw:::btw_this.character("@help dplyr mutate")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(pkg, topic))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(pkg, topic))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:121:3'): @help command works with topic only --------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-btw::btw_this("@help mutate") at test-btw_this.R:121:3
2. \-btw:::btw_this.character("@help mutate")
3. \-btw:::dispatch_at_command(cmd, caller_env)
4. \-btw (local) btw_this_cmd(cmd$args)
5. +-btw::btw_this(as_btw_docs_topic(NULL, args))
6. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(NULL, args))
7. \-btw:::btw_tool_docs_help_page_impl(...)
8. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
9. \-btw:::simplify_help_page_arguments(html)
10. \-btw:::map(...)
11. \-base::lapply(.x, .f, ...)
12. \-btw (local) FUN(X[[i]], ...)
13. +-base::paste(map_chr(children, as.character), collapse = "\n")
14. \-btw:::map_chr(children, as.character)
15. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
16. \-rlang::as_function(.f, env = global_env())
17. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
18. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:467:3'): legacy ?topic syntax still works -----------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(`?`(dplyr::mutate)), btw_this("?dplyr::mutate")) at test-btw_this.R:467:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(`?`(dplyr::mutate))
5. \-btw:::btw_this.help_files_with_topic(`?`(dplyr::mutate))
6. \-btw:::btw_tool_docs_help_page_impl(...)
7. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
8. \-btw:::simplify_help_page_arguments(html)
9. \-btw:::map(...)
10. \-base::lapply(.x, .f, ...)
11. \-btw (local) FUN(X[[i]], ...)
12. +-base::paste(map_chr(children, as.character), collapse = "\n")
13. \-btw:::map_chr(children, as.character)
14. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
15. \-rlang::as_function(.f, env = global_env())
16. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
17. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:517:3'): @ commands handle extra whitespace ---------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(" @help dplyr::mutate "), btw_this("@help dplyr::mutate")) at test-btw_this.R:517:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(" @help dplyr::mutate ")
5. \-btw:::btw_this.character(" @help dplyr::mutate ")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(parts[1], parts[2]))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(parts[1], parts[2]))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:11:3'): btw_tool_docs_help_page() works ------------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw::btw_tool_docs_help_page(package_name = "stats", topic = "rnorm") at test-tool-docs.R:11:3
2. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
3. \-btw:::simplify_help_page_arguments(html)
4. \-btw:::map(...)
5. \-base::lapply(.x, .f, ...)
6. \-btw (local) FUN(X[[i]], ...)
7. +-base::paste(map_chr(children, as.character), collapse = "\n")
8. \-btw:::map_chr(children, as.character)
9. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
10. \-rlang::as_function(.f, env = global_env())
11. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
12. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:100:5'): simplify_help_page_arguments() / converts argument tables to heading format --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:100:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:133:5'): simplify_help_page_arguments() / preserves full HTML structure including lists --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:133:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:150:5'): simplify_help_page_arguments() / handles rows without code tags --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:150:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:179:5'): simplify_help_page_arguments() / handles tables with single cell rows --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:179:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:228:5'): simplify_help_page_arguments() / only transforms first table in Arguments section --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:228:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:20:3'): btw_tool_docs_package_news() with search term --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(...) at test-tool-docs-news.R:20:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-base::I(btw_tool_docs_package_news("dplyr", "filter")@value)
5. | \-base::unique.default(c("AsIs", oldClass(x)))
6. \-btw::btw_tool_docs_package_news("dplyr", "filter")
7. \-btw:::package_news_search(...)
8. \-btw:::map_chr(news$HTML, extract_relevant_news, search_term = search_term)
9. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
10. \-base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
11. \-btw (local) FUN(X[[i]], ...)
12. \-btw:::map_chr(all_elements[has_text], as.character)
13. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
14. \-rlang::as_function(.f, env = global_env())
15. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
16. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:53:3'): btw_tool_docs_package_news() selects a requested version --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw::btw_tool_docs_package_news(...) at test-tool-docs-news.R:53:3
2. \-btw:::package_news_search(...)
3. \-btw:::map_chr(news$HTML, extract_relevant_news, search_term = search_term)
4. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
5. \-base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
6. \-btw (local) FUN(X[[i]], ...)
7. \-btw:::map_chr(all_elements[has_text], as.character)
8. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
9. \-rlang::as_function(.f, env = global_env())
10. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
11. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:136:3'): btw_tool_docs_package_news() when no news is found --
Error in `(S7::as_class(ellmer::ContentText))(text = text, ...)`: unused argument ("")
Backtrace:
x
1. +-testthat::expect_message(...) at test-tool-docs-news.R:136: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. +-testthat::expect_s3_class(btw(package_news("R")), "btw::btw")
8. | \-testthat::quasi_label(enquo(object))
9. | \-rlang::eval_bare(expr, quo_get_env(quo))
10. \-btw::btw(package_news("R"))
11. \-btw:::BTW("")
12. \-S7::new_object(...)
13. \-S7:::check_parent(`_parent`, class)
14. \-S7:::class_inherits(parent, parent_class)
-- Failure ('test-tool-run.R:598:3'): btw_tool_run_r() drops non-serializable extra$data --
Expected `res@extra$data` to be NULL.
Differences:
`actual` is an S7 object of class <ellmer::ContentText>
`expected` is NULL
[ FAIL 16 | WARN 2 | SKIP 154 | PASS 2081 ]
Error:
! Test failures.
Execution halted
Ran 8/8 deferred expressions
Flavor: r-devel-linux-x86_64-debian-gcc
Version: 1.5.0
Check: examples
Result: ERROR
Running examples in ‘btw-Ex.R’ failed
The error most likely occurred in:
> ### Name: btw_tool_docs_package_news
> ### Title: Tool: Package Release Notes
> ### Aliases: btw_tool_docs_package_news
>
> ### ** Examples
>
> ## Don't show:
> if (rmarkdown::pandoc_available()) withAutoprint({ # examplesIf
+ ## End(Don't show)
+ # Copy release notes to the clipboard for use in any AI app
+ btw("@news dplyr", clipboard = FALSE)
+
+ btw("@news dplyr join_by", clipboard = FALSE)
+
+ if (interactive()) { # can be slow
+ if (R.version$major == 4 && R.version$minor > "2.0") {
+ # Search through R's release notes.
+ # This should find a NEWS entry from R 4.2
+ btw("@news R dynamic rd content", clipboard = FALSE)
+ }
+ }
+
+ # Tool use by LLMs via ellmer or MCP ----
+ btw_tool_docs_package_news("dplyr")
+
+ btw_tool_docs_package_news("dplyr", "join_by")
+
+ # Read the NEWS entries for a specific installed package version
+ btw_tool_docs_package_news("dplyr", version = "1.1.4")
+ ## Don't show:
+ }) # examplesIf
> btw("@news dplyr", clipboard = FALSE)
## Context
### dplyr v1.2.1
- dplyr is now fully compliant with the R C API (#7819).
> btw("@news dplyr join_by", clipboard = FALSE)
Error in `.rlang_purrr_map_mold()`:
! Can't convert `.f`, a list, to a function.
Backtrace:
▆
1. ├─base::withAutoprint(...)
2. │ └─base::source(...)
3. │ ├─base::withVisible(eval(ei, envir))
4. │ └─base::eval(ei, envir)
5. │ └─base::eval(ei, envir)
6. └─btw::btw("@news dplyr join_by", clipboard = FALSE)
7. ├─btw::btw_this(...)
8. └─btw:::btw_this.environment(...)
9. └─btw:::btw_tool_env_describe_environment_impl(...)
10. └─btw:::map(...)
11. └─base::lapply(.x, .f, ...)
12. └─btw (local) FUN(X[[i]], ...)
13. ├─btw::btw_this(item, caller_env = environment)
14. └─btw:::btw_this.character(item, caller_env = environment)
15. └─btw:::dispatch_at_command(cmd, caller_env)
16. └─btw (local) btw_this_cmd(cmd$args)
17. ├─base::I(...)
18. │ └─base::unique.default(c("AsIs", oldClass(x)))
19. └─btw:::btw_tool_docs_package_news_impl(...)
20. └─btw:::package_news_search(...)
21. └─btw:::map_chr(news$HTML, extract_relevant_news, search_term = search_term)
22. └─btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
23. └─base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
24. └─btw (local) FUN(X[[i]], ...)
25. └─btw:::map_chr(all_elements[has_text], as.character)
26. └─btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
27. └─rlang::as_function(.f, env = global_env())
28. └─rlang:::abort_coercion(x, "a function", arg = arg, call = call)
29. └─rlang::abort(msg, call = call)
Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc
Version: 1.5.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [123s/139s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(btw)
>
> local_reproducible_output()
>
> test_check("btw")
Starting 2 test processes.
> test-btw_chat_history_store.R: Loading required package: shiny
> test-btw_client_app.R: No personal access token (PAT) available.
> test-btw_client_app.R: Obtain a PAT from here:
> test-btw_client_app.R: https://github.com/settings/tokens
> test-btw_client_app.R: For more on what to do with the PAT, see ?gh_whoami.
Saving _problems/test-btw_this-32.R
Saving _problems/test-btw_this-109.R
Saving _problems/test-btw_this-116.R
Saving _problems/test-btw_this-121.R
Saving _problems/test-btw_this-470.R
Saving _problems/test-btw_this-520.R
> test-tool-cran.R: No personal access token (PAT) available.
> test-tool-cran.R: Obtain a PAT from here:
> test-tool-cran.R: https://github.com/settings/tokens
> test-tool-cran.R: For more on what to do with the PAT, see ?gh_whoami.
Saving _problems/test-tool-docs-11.R
Saving _problems/test-tool-docs-100.R
Saving _problems/test-tool-docs-133.R
Saving _problems/test-tool-docs-150.R
Saving _problems/test-tool-docs-179.R
Saving _problems/test-tool-docs-228.R
Saving _problems/test-tool-docs-news-23.R
Saving _problems/test-tool-docs-news-57.R
Saving _problems/test-tool-docs-news-139.R
> test-tool-sessioninfo.R: Using model = "claude-sonnet-5-5".
[ FAIL 15 | WARN 2 | SKIP 154 | PASS 2082 ]
== Skipped tests (154) =========================================================
* BtwToolBuiltIn class not available (3): 'test-tools.R:122:3',
'test-tools.R:143:3', 'test-tools.R:162:3'
* On CRAN (66): 'test-btw.R:7:1', 'test-btw_client_app_slash_commands.R:98:1',
'test-clipboard.R:1:1', 'test-btw_this.R:42:1', 'test-btw_this.R:474:3',
'test-btw_this.R:681:1', 'test-btw_this.R:698:1', 'test-deprecated.R:19:3',
'test-deprecated.R:112:3', 'test-edit_btw_md.R:1:1',
'test-edit_btw_md.R:27:1', 'test-edit_btw_md.R:39:1',
'test-edit_btw_md.R:54:1', 'test-edit_btw_md.R:70:1',
'test-edit_btw_md.R:87:1', 'test-edit_btw_md.R:104:1',
'test-edit_btw_md.R:123:1', 'test-edit_btw_md.R:143:1',
'test-edit_btw_md.R:161:1', 'test-edit_btw_md.R:183:1',
'test-edit_btw_md.R:330:1', 'test-edit_btw_md.R:357:1',
'test-tool-cran.R:42:3', 'test-tool-cran.R:56:3', 'test-tool-docs.R:23:1',
'test-tool-docs.R:31:3', 'test-tool-docs.R:59:3', 'test-tool-docs.R:78:1',
'test-tool-env.R:15:1', 'test-tool-files-edit.R:280:1',
'test-tool-files-edit.R:313:1', 'test-tool-files-edit.R:351:1',
'test-tool-files-edit.R:382:1', 'test-tool-files-edit.R:412:1',
'test-tool-files-edit.R:449:1', 'test-tool-files-edit.R:491:1',
'test-tool-files-patch.R:416:1', 'test-tool-files-patch.R:441:1',
'test-tool-files-write.R:1:1', 'test-tool-git.R:1:1', 'test-tool-git.R:67:1',
'test-tool-git.R:107:1', 'test-tool-git.R:132:1', 'test-tool-git.R:166:1',
'test-tool-git.R:191:1', 'test-tool-git.R:214:1', 'test-tool-git.R:345:1',
'test-tool-ide.R:1:1', 'test-tool-pkg-devtools-covr.R:295:1',
'test-tool-pkg-src.R:3:1', 'test-tool-run.R:195:1', 'test-tool-web.R:23:3',
'test-tool-web.R:54:3', 'test-tool-web.R:107:3', 'test-tool-web.R:128:3',
'test-tool-web.R:164:3', 'test-tool-web.R:206:1', 'test-tool-web.R:229:3',
'test-tool-sessioninfo.R:3:1', 'test-tool-sessioninfo.R:40:1',
'test-tool_skills.R:1621:1', 'test-tool_skills.R:1691:1',
'test-utils-md.R:1:1', 'test-utils-md.R:5:1', 'test-utils-shinychat.R:10:1',
'test-utils.R:383:1'
* On Linux (21): 'test-btw.R:2:3', 'test-btw_client.R:33:5',
'test-btw_client.R:105:3', 'test-btw_client.R:259:5',
'test-btw_client.R:270:5', 'test-btw_client.R:352:5',
'test-btw_client.R:391:5', 'test-btw_this.R:4:3', 'test-btw_this.R:386:3',
'test-btw_this.R:422:3', 'test-tool-cran.R:23:3', 'test-tool-cran.R:74:3',
'test-tool-env-df.R:1:1', 'test-tool-env.R:2:3',
'test-tool-files-list.R:19:3', 'test-tool-files-read.R:43:3',
'test-tool-ide.R:177:3', 'test-tool-ide.R:199:3',
'test-tool-docs-news.R:187:3', 'test-tool_skills.R:1289:3',
'test-utils.R:7:3'
* btw CLI script not found (62): 'test-cli.R:51:3', 'test-cli.R:60:3',
'test-cli.R:69:3', 'test-cli.R:77:3', 'test-cli.R:84:3', 'test-cli.R:91:3',
'test-cli.R:100:3', 'test-cli.R:109:3', 'test-cli.R:115:3',
'test-cli.R:122:3', 'test-cli.R:131:3', 'test-cli.R:139:3',
'test-cli.R:148:3', 'test-cli.R:156:3', 'test-cli.R:167:3',
'test-cli.R:174:3', 'test-cli.R:192:3', 'test-cli.R:203:3',
'test-cli.R:214:3', 'test-cli.R:225:3', 'test-cli.R:233:3',
'test-cli.R:241:3', 'test-cli.R:253:3', 'test-cli.R:266:3',
'test-cli.R:274:3', 'test-cli.R:280:3', 'test-cli.R:297:3',
'test-cli.R:314:3', 'test-cli.R:335:3', 'test-cli.R:347:3',
'test-cli.R:358:3', 'test-cli.R:369:3', 'test-cli.R:387:3',
'test-cli.R:401:3', 'test-cli.R:407:3', 'test-cli.R:444:3',
'test-cli.R:509:3', 'test-cli.R:524:3', 'test-cli.R:531:3',
'test-cli.R:547:3', 'test-cli.R:552:3', 'test-cli.R:559:3',
'test-cli.R:571:3', 'test-cli.R:577:3', 'test-cli.R:596:3',
'test-cli.R:601:3', 'test-cli.R:609:3', 'test-cli.R:618:3',
'test-cli.R:631:3', 'test-cli.R:645:3', 'test-cli.R:666:3',
'test-cli.R:678:3', 'test-cli.R:696:3', 'test-cli.R:705:3',
'test-cli.R:713:3', 'test-cli.R:735:3', 'test-cli.R:747:3',
'test-cli.R:753:3', 'test-cli.R:764:3', 'test-cli.R:788:3',
'test-cli.R:816:3', 'test-cli.R:828:3'
* {bsicons} is not installed (1): 'test-tool-agent-custom.R:533:3'
* {phosphoricons} is not installed (1): 'test-tool-agent-custom.R:553:3'
== Failed tests ================================================================
-- Error ('test-btw_this.R:29:3'): btw_this.btw_docs_topic() -------------------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(`?`(dplyr::mutate)), btw_this("?dplyr::mutate")) at test-btw_this.R:29:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(`?`(dplyr::mutate))
5. \-btw:::btw_this.help_files_with_topic(`?`(dplyr::mutate))
6. \-btw:::btw_tool_docs_help_page_impl(...)
7. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
8. \-btw:::simplify_help_page_arguments(html)
9. \-btw:::map(...)
10. \-base::lapply(.x, .f, ...)
11. \-btw (local) FUN(X[[i]], ...)
12. +-base::paste(map_chr(children, as.character), collapse = "\n")
13. \-btw:::map_chr(children, as.character)
14. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
15. \-rlang::as_function(.f, env = global_env())
16. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
17. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:106:3'): @help command works with pkg::topic syntax --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this("@help dplyr::mutate"), btw_this("?dplyr::mutate")) at test-btw_this.R:106:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this("@help dplyr::mutate")
5. \-btw:::btw_this.character("@help dplyr::mutate")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(parts[1], parts[2]))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(parts[1], parts[2]))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:113:3'): @help command works with space-separated syntax --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this("@help dplyr mutate"), btw_this("?dplyr::mutate")) at test-btw_this.R:113:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this("@help dplyr mutate")
5. \-btw:::btw_this.character("@help dplyr mutate")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(pkg, topic))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(pkg, topic))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:121:3'): @help command works with topic only --------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-btw::btw_this("@help mutate") at test-btw_this.R:121:3
2. \-btw:::btw_this.character("@help mutate")
3. \-btw:::dispatch_at_command(cmd, caller_env)
4. \-btw (local) btw_this_cmd(cmd$args)
5. +-btw::btw_this(as_btw_docs_topic(NULL, args))
6. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(NULL, args))
7. \-btw:::btw_tool_docs_help_page_impl(...)
8. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
9. \-btw:::simplify_help_page_arguments(html)
10. \-btw:::map(...)
11. \-base::lapply(.x, .f, ...)
12. \-btw (local) FUN(X[[i]], ...)
13. +-base::paste(map_chr(children, as.character), collapse = "\n")
14. \-btw:::map_chr(children, as.character)
15. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
16. \-rlang::as_function(.f, env = global_env())
17. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
18. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:467:3'): legacy ?topic syntax still works -----------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(`?`(dplyr::mutate)), btw_this("?dplyr::mutate")) at test-btw_this.R:467:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(`?`(dplyr::mutate))
5. \-btw:::btw_this.help_files_with_topic(`?`(dplyr::mutate))
6. \-btw:::btw_tool_docs_help_page_impl(...)
7. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
8. \-btw:::simplify_help_page_arguments(html)
9. \-btw:::map(...)
10. \-base::lapply(.x, .f, ...)
11. \-btw (local) FUN(X[[i]], ...)
12. +-base::paste(map_chr(children, as.character), collapse = "\n")
13. \-btw:::map_chr(children, as.character)
14. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
15. \-rlang::as_function(.f, env = global_env())
16. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
17. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:517:3'): @ commands handle extra whitespace ---------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(" @help dplyr::mutate "), btw_this("@help dplyr::mutate")) at test-btw_this.R:517:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(" @help dplyr::mutate ")
5. \-btw:::btw_this.character(" @help dplyr::mutate ")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(parts[1], parts[2]))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(parts[1], parts[2]))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:11:3'): btw_tool_docs_help_page() works ------------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw::btw_tool_docs_help_page(package_name = "stats", topic = "rnorm") at test-tool-docs.R:11:3
2. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
3. \-btw:::simplify_help_page_arguments(html)
4. \-btw:::map(...)
5. \-base::lapply(.x, .f, ...)
6. \-btw (local) FUN(X[[i]], ...)
7. +-base::paste(map_chr(children, as.character), collapse = "\n")
8. \-btw:::map_chr(children, as.character)
9. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
10. \-rlang::as_function(.f, env = global_env())
11. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
12. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:100:5'): simplify_help_page_arguments() / converts argument tables to heading format --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:100:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:133:5'): simplify_help_page_arguments() / preserves full HTML structure including lists --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:133:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:150:5'): simplify_help_page_arguments() / handles rows without code tags --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:150:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:179:5'): simplify_help_page_arguments() / handles tables with single cell rows --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:179:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:228:5'): simplify_help_page_arguments() / only transforms first table in Arguments section --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:228:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:20:3'): btw_tool_docs_package_news() with search term --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(...) at test-tool-docs-news.R:20:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-base::I(btw_tool_docs_package_news("dplyr", "filter")@value)
5. | \-base::unique.default(c("AsIs", oldClass(x)))
6. \-btw::btw_tool_docs_package_news("dplyr", "filter")
7. \-btw:::package_news_search(...)
8. \-btw:::map_chr(news$HTML, extract_relevant_news, search_term = search_term)
9. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
10. \-base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
11. \-btw (local) FUN(X[[i]], ...)
12. \-btw:::map_chr(all_elements[has_text], as.character)
13. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
14. \-rlang::as_function(.f, env = global_env())
15. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
16. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:53:3'): btw_tool_docs_package_news() selects a requested version --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw::btw_tool_docs_package_news(...) at test-tool-docs-news.R:53:3
2. \-btw:::package_news_search(...)
3. \-btw:::map_chr(news$HTML, extract_relevant_news, search_term = search_term)
4. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
5. \-base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
6. \-btw (local) FUN(X[[i]], ...)
7. \-btw:::map_chr(all_elements[has_text], as.character)
8. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
9. \-rlang::as_function(.f, env = global_env())
10. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
11. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:136:3'): btw_tool_docs_package_news() when no news is found --
Error in `(S7::as_class(ellmer::ContentText))(text = text, ...)`: unused argument ("")
Backtrace:
x
1. +-testthat::expect_message(...) at test-tool-docs-news.R:136: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. +-testthat::expect_s3_class(btw(package_news("R")), "btw::btw")
8. | \-testthat::quasi_label(enquo(object))
9. | \-rlang::eval_bare(expr, quo_get_env(quo))
10. \-btw::btw(package_news("R"))
11. \-btw:::BTW("")
12. \-S7::new_object(...)
13. \-S7:::check_parent(`_parent`, class)
14. \-S7:::class_inherits(parent, parent_class)
[ FAIL 15 | WARN 2 | SKIP 154 | PASS 2082 ]
Error:
! Test failures.
Execution halted
Ran 8/8 deferred expressions
Flavor: r-devel-linux-x86_64-fedora-clang
Version: 1.5.0
Check: tests
Result: ERROR
Running ‘testthat.R’ [126s/165s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
> # This file is part of the standard setup for testthat.
> # It is recommended that you do not modify it.
> #
> # Where should you do additional test configuration?
> # Learn more about the roles of various files in:
> # * https://r-pkgs.org/testing-design.html#sec-tests-files-overview
> # * https://testthat.r-lib.org/articles/special-files.html
>
> library(testthat)
> library(btw)
>
> local_reproducible_output()
>
> test_check("btw")
Starting 2 test processes.
> test-btw_chat_history_store.R: Loading required package: shiny
> test-btw_client_app.R: No personal access token (PAT) available.
> test-btw_client_app.R: Obtain a PAT from here:
> test-btw_client_app.R: https://github.com/settings/tokens
> test-btw_client_app.R: For more on what to do with the PAT, see ?gh_whoami.
Saving _problems/test-btw_this-32.R
Saving _problems/test-btw_this-109.R
Saving _problems/test-btw_this-116.R
Saving _problems/test-btw_this-121.R
Saving _problems/test-btw_this-470.R
Saving _problems/test-btw_this-520.R
Saving _problems/test-tool-docs-11.R
Saving _problems/test-tool-docs-100.R
Saving _problems/test-tool-docs-133.R
Saving _problems/test-tool-docs-150.R
Saving _problems/test-tool-docs-179.R
Saving _problems/test-tool-docs-228.R
Saving _problems/test-tool-docs-news-23.R
Saving _problems/test-tool-docs-news-57.R
Saving _problems/test-tool-docs-news-139.R
> test-tool-sessioninfo.R: Using model = "claude-sonnet-5-5".
[ FAIL 15 | WARN 1 | SKIP 152 | PASS 2088 ]
== Skipped tests (152) =========================================================
* BtwToolBuiltIn class not available (3): 'test-tools.R:122:3',
'test-tools.R:143:3', 'test-tools.R:162:3'
* On CRAN (66): 'test-btw.R:7:1', 'test-btw_client_app_slash_commands.R:98:1',
'test-clipboard.R:1:1', 'test-btw_this.R:42:1', 'test-btw_this.R:474:3',
'test-btw_this.R:681:1', 'test-btw_this.R:698:1', 'test-deprecated.R:19:3',
'test-deprecated.R:112:3', 'test-edit_btw_md.R:1:1',
'test-edit_btw_md.R:27:1', 'test-edit_btw_md.R:39:1',
'test-edit_btw_md.R:54:1', 'test-edit_btw_md.R:70:1',
'test-edit_btw_md.R:87:1', 'test-edit_btw_md.R:104:1',
'test-edit_btw_md.R:123:1', 'test-edit_btw_md.R:143:1',
'test-edit_btw_md.R:161:1', 'test-edit_btw_md.R:183:1',
'test-edit_btw_md.R:330:1', 'test-edit_btw_md.R:357:1',
'test-tool-cran.R:42:3', 'test-tool-cran.R:56:3', 'test-tool-docs.R:23:1',
'test-tool-docs.R:31:3', 'test-tool-docs.R:59:3', 'test-tool-docs.R:78:1',
'test-tool-env.R:15:1', 'test-tool-files-edit.R:280:1',
'test-tool-files-edit.R:313:1', 'test-tool-files-edit.R:351:1',
'test-tool-files-edit.R:382:1', 'test-tool-files-edit.R:412:1',
'test-tool-files-edit.R:449:1', 'test-tool-files-edit.R:491:1',
'test-tool-files-patch.R:416:1', 'test-tool-files-patch.R:441:1',
'test-tool-files-write.R:1:1', 'test-tool-git.R:1:1', 'test-tool-git.R:67:1',
'test-tool-git.R:107:1', 'test-tool-git.R:132:1', 'test-tool-git.R:166:1',
'test-tool-git.R:191:1', 'test-tool-git.R:214:1', 'test-tool-git.R:345:1',
'test-tool-ide.R:1:1', 'test-tool-pkg-devtools-covr.R:295:1',
'test-tool-pkg-src.R:3:1', 'test-tool-sessioninfo.R:3:1',
'test-tool-sessioninfo.R:40:1', 'test-tool-web.R:23:3',
'test-tool-web.R:54:3', 'test-tool-web.R:107:3', 'test-tool-web.R:128:3',
'test-tool-web.R:164:3', 'test-tool-web.R:206:1', 'test-tool-web.R:229:3',
'test-tool-run.R:195:1', 'test-tool_skills.R:1621:1',
'test-tool_skills.R:1691:1', 'test-utils-md.R:1:1', 'test-utils-md.R:5:1',
'test-utils-shinychat.R:10:1', 'test-utils.R:383:1'
* On Linux (21): 'test-btw.R:2:3', 'test-btw_client.R:33:5',
'test-btw_client.R:105:3', 'test-btw_client.R:259:5',
'test-btw_client.R:270:5', 'test-btw_client.R:352:5',
'test-btw_client.R:391:5', 'test-btw_this.R:4:3', 'test-btw_this.R:386:3',
'test-btw_this.R:422:3', 'test-tool-cran.R:23:3', 'test-tool-cran.R:74:3',
'test-tool-env-df.R:1:1', 'test-tool-env.R:2:3',
'test-tool-files-list.R:19:3', 'test-tool-files-read.R:43:3',
'test-tool-docs-news.R:187:3', 'test-tool-ide.R:177:3',
'test-tool-ide.R:199:3', 'test-tool_skills.R:1289:3', 'test-utils.R:7:3'
* btw CLI script not found (62): 'test-cli.R:51:3', 'test-cli.R:60:3',
'test-cli.R:69:3', 'test-cli.R:77:3', 'test-cli.R:84:3', 'test-cli.R:91:3',
'test-cli.R:100:3', 'test-cli.R:109:3', 'test-cli.R:115:3',
'test-cli.R:122:3', 'test-cli.R:131:3', 'test-cli.R:139:3',
'test-cli.R:148:3', 'test-cli.R:156:3', 'test-cli.R:167:3',
'test-cli.R:174:3', 'test-cli.R:192:3', 'test-cli.R:203:3',
'test-cli.R:214:3', 'test-cli.R:225:3', 'test-cli.R:233:3',
'test-cli.R:241:3', 'test-cli.R:253:3', 'test-cli.R:266:3',
'test-cli.R:274:3', 'test-cli.R:280:3', 'test-cli.R:297:3',
'test-cli.R:314:3', 'test-cli.R:335:3', 'test-cli.R:347:3',
'test-cli.R:358:3', 'test-cli.R:369:3', 'test-cli.R:387:3',
'test-cli.R:401:3', 'test-cli.R:407:3', 'test-cli.R:444:3',
'test-cli.R:509:3', 'test-cli.R:524:3', 'test-cli.R:531:3',
'test-cli.R:547:3', 'test-cli.R:552:3', 'test-cli.R:559:3',
'test-cli.R:571:3', 'test-cli.R:577:3', 'test-cli.R:596:3',
'test-cli.R:601:3', 'test-cli.R:609:3', 'test-cli.R:618:3',
'test-cli.R:631:3', 'test-cli.R:645:3', 'test-cli.R:666:3',
'test-cli.R:678:3', 'test-cli.R:696:3', 'test-cli.R:705:3',
'test-cli.R:713:3', 'test-cli.R:735:3', 'test-cli.R:747:3',
'test-cli.R:753:3', 'test-cli.R:764:3', 'test-cli.R:788:3',
'test-cli.R:816:3', 'test-cli.R:828:3'
== Failed tests ================================================================
-- Error ('test-btw_this.R:29:3'): btw_this.btw_docs_topic() -------------------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(`?`(dplyr::mutate)), btw_this("?dplyr::mutate")) at test-btw_this.R:29:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(`?`(dplyr::mutate))
5. \-btw:::btw_this.help_files_with_topic(`?`(dplyr::mutate))
6. \-btw:::btw_tool_docs_help_page_impl(...)
7. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
8. \-btw:::simplify_help_page_arguments(html)
9. \-btw:::map(...)
10. \-base::lapply(.x, .f, ...)
11. \-btw (local) FUN(X[[i]], ...)
12. +-base::paste(map_chr(children, as.character), collapse = "\n")
13. \-btw:::map_chr(children, as.character)
14. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
15. \-rlang::as_function(.f, env = global_env())
16. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
17. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:106:3'): @help command works with pkg::topic syntax --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this("@help dplyr::mutate"), btw_this("?dplyr::mutate")) at test-btw_this.R:106:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this("@help dplyr::mutate")
5. \-btw:::btw_this.character("@help dplyr::mutate")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(parts[1], parts[2]))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(parts[1], parts[2]))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:113:3'): @help command works with space-separated syntax --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this("@help dplyr mutate"), btw_this("?dplyr::mutate")) at test-btw_this.R:113:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this("@help dplyr mutate")
5. \-btw:::btw_this.character("@help dplyr mutate")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(pkg, topic))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(pkg, topic))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:121:3'): @help command works with topic only --------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-btw::btw_this("@help mutate") at test-btw_this.R:121:3
2. \-btw:::btw_this.character("@help mutate")
3. \-btw:::dispatch_at_command(cmd, caller_env)
4. \-btw (local) btw_this_cmd(cmd$args)
5. +-btw::btw_this(as_btw_docs_topic(NULL, args))
6. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(NULL, args))
7. \-btw:::btw_tool_docs_help_page_impl(...)
8. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
9. \-btw:::simplify_help_page_arguments(html)
10. \-btw:::map(...)
11. \-base::lapply(.x, .f, ...)
12. \-btw (local) FUN(X[[i]], ...)
13. +-base::paste(map_chr(children, as.character), collapse = "\n")
14. \-btw:::map_chr(children, as.character)
15. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
16. \-rlang::as_function(.f, env = global_env())
17. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
18. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:467:3'): legacy ?topic syntax still works -----------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(`?`(dplyr::mutate)), btw_this("?dplyr::mutate")) at test-btw_this.R:467:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(`?`(dplyr::mutate))
5. \-btw:::btw_this.help_files_with_topic(`?`(dplyr::mutate))
6. \-btw:::btw_tool_docs_help_page_impl(...)
7. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
8. \-btw:::simplify_help_page_arguments(html)
9. \-btw:::map(...)
10. \-base::lapply(.x, .f, ...)
11. \-btw (local) FUN(X[[i]], ...)
12. +-base::paste(map_chr(children, as.character), collapse = "\n")
13. \-btw:::map_chr(children, as.character)
14. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
15. \-rlang::as_function(.f, env = global_env())
16. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
17. \-rlang::abort(msg, call = call)
-- Error ('test-btw_this.R:517:3'): @ commands handle extra whitespace ---------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(btw_this(" @help dplyr::mutate "), btw_this("@help dplyr::mutate")) at test-btw_this.R:517:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-btw::btw_this(" @help dplyr::mutate ")
5. \-btw:::btw_this.character(" @help dplyr::mutate ")
6. \-btw:::dispatch_at_command(cmd, caller_env)
7. \-btw (local) btw_this_cmd(cmd$args)
8. +-btw::btw_this(as_btw_docs_topic(parts[1], parts[2]))
9. \-btw:::btw_this.btw_docs_topic(as_btw_docs_topic(parts[1], parts[2]))
10. \-btw:::btw_tool_docs_help_page_impl(...)
11. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
12. \-btw:::simplify_help_page_arguments(html)
13. \-btw:::map(...)
14. \-base::lapply(.x, .f, ...)
15. \-btw (local) FUN(X[[i]], ...)
16. +-base::paste(map_chr(children, as.character), collapse = "\n")
17. \-btw:::map_chr(children, as.character)
18. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
19. \-rlang::as_function(.f, env = global_env())
20. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
21. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:11:3'): btw_tool_docs_help_page() works ------------
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw::btw_tool_docs_help_page(package_name = "stats", topic = "rnorm") at test-tool-docs.R:11:3
2. \-btw:::format_help_page_markdown(help_page, options = c("--shift-heading-level-by=1"))
3. \-btw:::simplify_help_page_arguments(html)
4. \-btw:::map(...)
5. \-base::lapply(.x, .f, ...)
6. \-btw (local) FUN(X[[i]], ...)
7. +-base::paste(map_chr(children, as.character), collapse = "\n")
8. \-btw:::map_chr(children, as.character)
9. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
10. \-rlang::as_function(.f, env = global_env())
11. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
12. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:100:5'): simplify_help_page_arguments() / converts argument tables to heading format --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:100:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:133:5'): simplify_help_page_arguments() / preserves full HTML structure including lists --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:133:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:150:5'): simplify_help_page_arguments() / handles rows without code tags --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:150:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:179:5'): simplify_help_page_arguments() / handles tables with single cell rows --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:179:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs.R:228:5'): simplify_help_page_arguments() / only transforms first table in Arguments section --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw:::simplify_help_page_arguments(html) at test-tool-docs.R:228:5
2. \-btw:::map(...)
3. \-base::lapply(.x, .f, ...)
4. \-btw (local) FUN(X[[i]], ...)
5. +-base::paste(map_chr(children, as.character), collapse = "\n")
6. \-btw:::map_chr(children, as.character)
7. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
8. \-rlang::as_function(.f, env = global_env())
9. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
10. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:20:3'): btw_tool_docs_package_news() with search term --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. +-testthat::expect_equal(...) at test-tool-docs-news.R:20:3
2. | \-testthat::quasi_label(enquo(object), label)
3. | \-rlang::eval_bare(expr, quo_get_env(quo))
4. +-base::I(btw_tool_docs_package_news("dplyr", "filter")@value)
5. | \-base::unique.default(c("AsIs", oldClass(x)))
6. \-btw::btw_tool_docs_package_news("dplyr", "filter")
7. \-btw:::package_news_search(...)
8. \-btw:::map_chr(news$HTML, extract_relevant_news, search_term = search_term)
9. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
10. \-base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
11. \-btw (local) FUN(X[[i]], ...)
12. \-btw:::map_chr(all_elements[has_text], as.character)
13. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
14. \-rlang::as_function(.f, env = global_env())
15. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
16. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:53:3'): btw_tool_docs_package_news() selects a requested version --
Error in `.rlang_purrr_map_mold(.x, .f, character(1), ...)`: Can't convert `.f`, a list, to a function.
Backtrace:
x
1. \-btw::btw_tool_docs_package_news(...) at test-tool-docs-news.R:53:3
2. \-btw:::package_news_search(...)
3. \-btw:::map_chr(news$HTML, extract_relevant_news, search_term = search_term)
4. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
5. \-base::vapply(.x, .f, .mold, ..., USE.NAMES = FALSE)
6. \-btw (local) FUN(X[[i]], ...)
7. \-btw:::map_chr(all_elements[has_text], as.character)
8. \-btw:::.rlang_purrr_map_mold(.x, .f, character(1), ...)
9. \-rlang::as_function(.f, env = global_env())
10. \-rlang:::abort_coercion(x, "a function", arg = arg, call = call)
11. \-rlang::abort(msg, call = call)
-- Error ('test-tool-docs-news.R:136:3'): btw_tool_docs_package_news() when no news is found --
Error in `(S7::as_class(ellmer::ContentText))(text = text, ...)`: unused argument ("")
Backtrace:
x
1. +-testthat::expect_message(...) at test-tool-docs-news.R:136: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. +-testthat::expect_s3_class(btw(package_news("R")), "btw::btw")
8. | \-testthat::quasi_label(enquo(object))
9. | \-rlang::eval_bare(expr, quo_get_env(quo))
10. \-btw::btw(package_news("R"))
11. \-btw:::BTW("")
12. \-S7::new_object(...)
13. \-S7:::check_parent(`_parent`, class)
14. \-S7:::class_inherits(parent, parent_class)
[ FAIL 15 | WARN 1 | SKIP 152 | PASS 2088 ]
Error:
! Test failures.
Execution halted
Ran 8/8 deferred expressions
Flavor: r-devel-linux-x86_64-fedora-gcc