Running ‘testthat.R’ [7s/36s]
Running the tests in ‘tests/testthat.R’ failed.
Complete output:
  > library(testthat)
  > library(codemetar)
  > 
  > test_check("codemetar")
  
   *** caught segfault ***
  address (nil), cause 'unknown'
  
  Traceback:
   1: curl::curl_fetch_memory(url, handle = h)
   2: (function (url) {    h <- curl::new_handle()    if (isTRUE(getOption("jsonld_use_accept", TRUE)))         curl::handle_setheaders(h, Accept = "application/ld+json, application/json")    req <- curl::curl_fetch_memory(url, handle = h)    if (req$status >= 400) {        json <- rawToChar(req$content)        if (jsonlite::validate(json)) {            data <- jsonlite::fromJSON(json)            if (length(data$message))                 stop(sprintf("(%s) %s", url, data$message))        }        stop(sprintf("Download (HTTP %d): %s", req$status, url))    }    headers <- curl::parse_headers_list(req$headers)    list(content_type = jsonlite::unbox(headers[["content-type"]]),         link = jsonlite::unbox(headers[["link"]]), final_url = jsonlite::unbox(req$url),         response_text = jsonlite::unbox(rawToChar(req$content)))})(url = "https://doi.org/10.5063/schema/codemeta-2.0")
   3: do.call(FUN, ARGS)
   4: (function (strfun, args = "{}") {    FUN <- eval(parse(text = strfun))    ARGS <- as.list(jsonlite::fromJSON(args))    if (!is.function(FUN))         stop("Argument is not a valid function")    out <- do.call(FUN, ARGS)    jsonlite::toJSON(out)})("jsonld:::download", "{\"url\":\"https://doi.org/10.5063/schema/codemeta-2.0\"}")
   5: evalq((function (strfun, args = "{}") {    FUN <- eval(parse(text = strfun))    ARGS <- as.list(jsonlite::fromJSON(args))    if (!is.function(FUN))         stop("Argument is not a valid function")    out <- do.call(FUN, ARGS)    jsonlite::toJSON(out)})("jsonld:::download", "{\"url\":\"https://doi.org/10.5063/schema/codemeta-2.0\"}"),     <environment>)
   6: evalq((function (strfun, args = "{}") {    FUN <- eval(parse(text = strfun))    ARGS <- as.list(jsonlite::fromJSON(args))    if (!is.function(FUN))         stop("Argument is not a valid function")    out <- do.call(FUN, ARGS)    jsonlite::toJSON(out)})("jsonld:::download", "{\"url\":\"https://doi.org/10.5063/schema/codemeta-2.0\"}"),     <environment>)
   7: doTryCatch(return(expr), name, parentenv, handler)
   8: tryCatchOne(expr, names, parentenv, handlers[[1L]])
   9: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  10: doTryCatch(return(expr), name, parentenv, handler)
  11: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  12: tryCatchList(expr, classes, parentenv, handlers)
  13: tryCatch(evalq((function (strfun, args = "{}") {    FUN <- eval(parse(text = strfun))    ARGS <- as.list(jsonlite::fromJSON(args))    if (!is.function(FUN))         stop("Argument is not a valid function")    out <- do.call(FUN, ARGS)    jsonlite::toJSON(out)})("jsonld:::download", "{\"url\":\"https://doi.org/10.5063/schema/codemeta-2.0\"}"),     <environment>), error = function (x) x, interrupt = function (x) x)
  14: context_eval(join(src), private$context)
  15: get_str_output(context_eval(join(src), private$context))
  16: this$eval(src)
  17: ctx$call("r_compact", doc, context, options)
  18: structure(ctx$call("r_compact", doc, context, options), class = "json")
  19: jsonld::jsonld_compact(y, context = codemeta_context)
  20: crosswalk_transform(x, crosswalk_context = from_context, codemeta_context = to_context)
  21: crosswalk(f, "GitHub")
  22: eval(code, test_env)
  23: eval(code, test_env)
  24: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  25: doTryCatch(return(expr), name, parentenv, handler)
  26: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  27: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  28: doTryCatch(return(expr), name, parentenv, handler)
  29: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  30: tryCatchList(expr, classes, parentenv, handlers)
  31: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  32: test_code(desc, code, env = parent.frame())
  33: testthat::test_that("we can call crosswalk", {    skip_on_os("windows")    f <- read_json(system.file("examples/github_format.json",         package = "codemetar"))    a <- crosswalk(f, "GitHub")    testthat::expect_is(a, "json")    writeLines(a, "test.json")    v <- codemeta_validate("test.json")    testthat::expect_true(v)    unlink("test.json")    f <- read_json(system.file("examples/package.json", package = "codemetar"))    a <- crosswalk(f, "NodeJS")    testthat::expect_is(a, "json")    writeLines(a, "nodejs.json")    v <- codemeta_validate("nodejs.json")    testthat::expect_true(v)    unlink("nodejs.json")    b <- drop_context(a)    add_context(b, getOption("codemeta_context", "http://purl.org/codemeta/2.0"))    f <- read_json(system.file("examples/github_format.json",         package = "codemetar"))    crosswalk(f, "GitHub", "Zenodo")    crosswalk_table(from = "GitHub", to = c("Zenodo", "Figshare"))})
  34: eval(code, test_env)
  35: eval(code, test_env)
  36: withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error)
  37: doTryCatch(return(expr), name, parentenv, handler)
  38: tryCatchOne(expr, names, parentenv, handlers[[1L]])
  39: tryCatchList(expr, names[-nh], parentenv, handlers[-nh])
  40: doTryCatch(return(expr), name, parentenv, handler)
  41: tryCatchOne(tryCatchList(expr, names[-nh], parentenv, handlers[-nh]),     names[nh], parentenv, handlers[[nh]])
  42: tryCatchList(expr, classes, parentenv, handlers)
  43: tryCatch(withCallingHandlers({    eval(code, test_env)    if (!handled && !is.null(test)) {        skip_empty()    }}, expectation = handle_expectation, skip = handle_skip, warning = handle_warning,     message = handle_message, error = handle_error), error = handle_fatal,     skip = function(e) {    })
  44: test_code(NULL, exprs, env)
  45: source_file(path, new.env(parent = env), chdir = TRUE, wrap = wrap)
  46: force(code)
  47: with_reporter(reporter = reporter, start_end_reporter = start_end_reporter,     {        lister$start_file(basename(path))        source_file(path, new.env(parent = env), chdir = TRUE,             wrap = wrap)        end_context()    })
  48: FUN(X[[i]], ...)
  49: lapply(paths, test_file, env = env, reporter = current_reporter,     start_end_reporter = FALSE, load_helpers = FALSE, wrap = wrap)
  50: force(code)
  51: with_reporter(reporter = current_reporter, results <- lapply(paths,     test_file, env = env, reporter = current_reporter, start_end_reporter = FALSE,     load_helpers = FALSE, wrap = wrap))
  52: test_files(paths, reporter = reporter, env = env, stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  53: test_dir(path = test_path, reporter = reporter, env = env, filter = filter,     ..., stop_on_failure = stop_on_failure, stop_on_warning = stop_on_warning,     wrap = wrap)
  54: test_package_dir(package = package, test_path = test_path, filter = filter,     reporter = reporter, ..., stop_on_failure = stop_on_failure,     stop_on_warning = stop_on_warning, wrap = wrap)
  55: test_check("codemetar")
  An irrecoverable exception occurred. R is aborting now ...
  Segmentation fault