Skip to content

failing tests with clipr 0.2.1.9000 #12

@mdlincoln

Description

@mdlincoln

I've added more rigorous error checking to clipr - perviously it had silently failed to write to the clipboard on Linux systems where xclip/xsel was installed, but where the DISPLAY envvar was not configured to allow headless operation of xlip/xsel. This meant that casual tests to write to the clipboard would pass on CRAN, but would actually fail to write.

Because of this, devtools::revdep_check() now fails on curlconverter.

Package: curlconverter
Check: examples
New result: ERROR
  Running examples in ‘curlconverter-Ex.R’ failed
  The error most likely occurred in:

  > base::assign(".ptime", proc.time(), pos = "CheckExEnv")
  > ### Name: make_req
  > ### Title: Turn parsed cURL command lines into 'httr' request functions
  > ### Aliases: make_req
  >
  > ### ** Examples
  >
  > library(httr)
  >
  > my_ip <- straighten("curl 'https://httpbin.org/ip'") %>% make_req()
  curl 'https://httpbin.org/ip'
  Error: Clipboard on X11 requires 'xclip' (recommended) or 'xsel'.

This is probably easily fixed with a judicious \dontrun{}. Along with this more rigorous error checking, I introduced a new function clipr_available() that will check whether the clipboard is write/readable. I've used this to skip() relevant tests on CRAN, which may also be of help to you.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions