R Under development (unstable) (2023-11-19 r85561 ucrt) -- "Unsuffered Consequences" Copyright (C) 2023 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. > library(gtools) > > # For debugging conveneince > cmdArgs <- commandArgs(trailingOnly = FALSE) > print(cmdArgs) [1] "D:\\RCompile\\recent\\R/bin/x64/Rterm.exe" [2] "-f" [3] "test_script_file.R" [4] "--restore" [5] "--save" [6] "--vanilla" > > file <- script_file("warning") > cat("script_file:", file, "\n") script_file: D:\RCompile\CRANincoming\R-devel\gtools.Rcheck\tests\test_script_file.R > stopifnot(endsWith(file, "test_script_file.R")) > > path <- script_path("warning") > cat("script_path:", path, "\n") script_path: D:/RCompile/CRANincoming/R-devel/gtools.Rcheck/tests > # stopifnot(endsWith(path, "tests")) > > # save.image("test_script_file.Rda") > > proc.time() user system elapsed 0.15 0.12 0.26