tests/testthat/test-lang-help.R

test_that("Interaction with LLM works", {
  invisible(
    lang_use_impl("simulate_llm", "echo", temp = 0.8, .is_internal = TRUE)
  )
  expect_snapshot(
    lang_help("llm_classify", "mall", lang = "spanish", type = "text")
  )
  expect_snapshot(
    lang_help("llm_classify", "mall", lang = "english", type = "text"),
    error = TRUE
  )
  expect_snapshot(
    lang_help("nothere", lang = "spanish", type = "text"),
    error = TRUE
  )
  expect_snapshot(
    lang_help("nothere", "notpkg", lang = "spanish", type = "text"),
    error = TRUE
  )
  expect_snapshot(
    lang_help("nothere", "mall", lang = "spanish", type = "text"),
    error = TRUE
  )
  skip_on_os("windows")
  expect_message(
    lang_help("lm", lang = "spanish", type = "text")
  )
})

Try the lang package in your browser

Any scripts or data that you put into this service are public.

lang documentation built on June 5, 2026, 5:08 p.m.