R Under development (unstable) (2024-02-16 r85931 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. > library("R.rsp") R.rsp v0.46.0 successfully loaded. See ?R.rsp for help. > Arguments <- R.utils::Arguments > enter <- R.utils::enter > exit <- R.utils::exit > > verbose <- Arguments$getVerbose(TRUE) > > path <- system.file(package="R.rsp") > path <- file.path(path, "rsp_tests") > > pathname <- file.path(path, "trimming-1.txt.rsp") > > verbose && enter(verbose, "Validating that the RSP parse output can be deparsed") Validating that the RSP parse output can be deparsed... [1] TRUE > > untils <- rev(eval(formals(R.rsp:::parseDocument.RspParser)$until)) > untils <- setdiff(untils, "*") > > for (kk in seq_along(untils)) { + until <- untils[kk] + verbose && enter(verbose, sprintf("Until #%d ('%s') of %d", kk, until, length(untils))) + s0 <- rcompile(file=pathname, until=until, output=RspString()) + d0 <- parseDocument(s0, until=until) + stopifnot(inherits(d0, "RspDocument")) + s1 <- asRspString(d0) + d1 <- parseDocument(s1, until=until) + stopifnot(inherits(d1, "RspDocument")) + stopifnot(identical(d1, d0)) + stopifnot(s1 == s0) + verbose && exit(verbose) + } Until #1 ('comments') of 4... Until #1 ('comments') of 4...done Until #2 ('directives') of 4... Until #2 ('directives') of 4...done Until #3 ('expressions') of 4... Until #3 ('expressions') of 4...done Until #4 ('end') of 4... Until #4 ('end') of 4...done > > verbose && exit(verbose) Validating that the RSP parse output can be deparsed...done [1] TRUE > > proc.time() user system elapsed 0.62 0.07 0.68