tests/testthat/_snaps/utils.md

write_if_different produces informative messages

Code
  write_if_different(path, "a <- 2")
Message
  Writing 'test.R'
Output
  [1] TRUE
Code
  write_if_different(path, "a <- 2")
Message
  x Skipping test.R (<file:///test.R>)
  i It already exists and was not generated by roxygen2.
Output
  [1] FALSE
Code
  write_if_different(path, "a <- 2")
Message
  x Skipping '+.R'
  i Invalid file name
Output
  [1] FALSE

write_if_different produces correct command hyperlink

Code
  write_if_different(path, "a <- 2", command = "rlang::inform('hi')")
Message
  Writing ']8;;x-r-run:rlang::inform('hi')test.R]8;;'
Output
  [1] TRUE


klutometis/roxygen documentation built on Aug. 2, 2024, 7:42 p.m.