R Under development (unstable) (2024-05-22 r86590 ucrt) -- "Unsuffered Consequences" Copyright (C) 2024 The R Foundation for Statistical Computing Platform: x86_64-w64-mingw32/x64 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. Type 'license()' or 'licence()' for distribution details. R is a collaborative project with many contributors. Type 'contributors()' for more information and 'citation()' on how to cite R or R packages in publications. Type 'demo()' for some demos, 'help()' for on-line help, or 'help.start()' for an HTML browser interface to help. Type 'q()' to quit R. > source("helper/helper.R") > > if (getRversion() >= "4.0.0") { + + f = get("paste", envir = baseenv()) + expect_same = makeCompareFun(f, backports:::paste) + + expect_same(letters[1:3], character()) + expect_same(letters[1:3], character(), recycle0 = TRUE) + expect_same(letters[1:3], character(), sep = "_", recycle0 = TRUE) + expect_same(letters[1:3], character(), sep = "_", collapse = "+", recycle0 = TRUE) + expect_same(letters[1:3], character(), collapse = NULL, recycle0 = TRUE) + expect_same(letters[1:3], character(), sep = NULL, recycle0 = TRUE) + expect_same(letters[1:3], character(), sep = NULL, collapse = NULL, recycle0 = TRUE) + expect_same(letters[1:3], character(), sep = character(), collapse = character(), recycle0 = TRUE) + + expect_same(character()) + expect_same(character(), recycle0 = TRUE) + expect_same(character(), sep = "_", recycle0 = TRUE) + expect_same(character(), sep = "_", collapse = "+", recycle0 = TRUE) + expect_same(character(), collapse = NULL, recycle0 = TRUE) + expect_same(character(), sep = NULL, recycle0 = TRUE) + expect_same(character(), sep = NULL, collapse = NULL, recycle0 = TRUE) + expect_same(character(), sep = character(), collapse = character(), recycle0 = TRUE) + + + + f = get("paste0", envir = baseenv()) + expect_same = makeCompareFun(f, backports:::paste0) + + expect_same(letters[1:3], character()) + expect_same(letters[1:3], character(), recycle0 = TRUE) + expect_same(letters[1:3], character(), recycle0 = TRUE) + expect_same(letters[1:3], character(), collapse = "+", recycle0 = TRUE) + expect_same(letters[1:3], character(), collapse = NULL, recycle0 = TRUE) + expect_same(letters[1:3], character(), collapse = NULL, recycle0 = TRUE) + expect_same(letters[1:3], character(), collapse = character(), recycle0 = TRUE) + + expect_same(character()) + expect_same(character(), recycle0 = TRUE) + expect_same(character(), recycle0 = TRUE) + expect_same(character(), collapse = "+", recycle0 = TRUE) + expect_same(character(), collapse = NULL, recycle0 = TRUE) + expect_same(character(), collapse = NULL, recycle0 = TRUE) + expect_same(character(), collapse = character(), recycle0 = TRUE) + } > > expect_identical( + paste(letters[1:3], character(), collapse = NULL, recycle0 = TRUE), + character() + ) > > expect_identical( + paste(letters[1:3], character(), collapse = "_", recycle0 = TRUE), + "" + ) > > expect_identical( + paste0(letters[1:3], character(), collapse = NULL, recycle0 = TRUE), + character() + ) > > expect_identical( + paste0(letters[1:3], character(), collapse = "_", recycle0 = TRUE), + "" + ) > > proc.time() user system elapsed 0.26 0.03 0.28