From 22bbb7784d44b7c77fc55db335be1ecffcb54e9a Mon Sep 17 00:00:00 2001 From: ripley Date: Tue, 11 Jul 2023 12:21:58 +0000 Subject: [PATCH] r84664 part II git-svn-id: https://svn.r-project.org/R/trunk@84678 00db46b3-68df-0310-9c12-caf00c1e9a41 --- src/library/base/man/Encoding.Rd | 4 ++-- src/library/tools/man/encoded.Rd | 2 +- src/library/tools/man/parseLatex.Rd | 4 ++-- src/library/tools/man/showNonASCII.Rd | 4 ++-- tests/Examples/tools-Ex.Rout.save | 29 ++++++++++++++++++--------- 5 files changed, 27 insertions(+), 16 deletions(-) diff --git a/src/library/base/man/Encoding.Rd b/src/library/base/man/Encoding.Rd index ae67c967560..899ffaa636b 100644 --- a/src/library/base/man/Encoding.Rd +++ b/src/library/base/man/Encoding.Rd @@ -1,6 +1,6 @@ % File src/library/base/man/Encoding.Rd % Part of the R package, https://www.R-project.org -% Copyright 1995-2022 R Core Team +% Copyright 1995-2023 R Core Team % Distributed under GPL 2 or later \name{Encoding} @@ -109,7 +109,7 @@ enc2utf8(x) } \examples{ ## x is intended to be in latin1 -x. <- x <- "fa\xE7ile" +x. <- x <- "fran\xE7ais" Encoding(x.) # "unknown" (UTF-8 loc.) | "latin1" (8859-1/CP-1252 loc.) | .... Encoding(x) <- "latin1" x diff --git a/src/library/tools/man/encoded.Rd b/src/library/tools/man/encoded.Rd index de53779def4..9e4f8881bb8 100644 --- a/src/library/tools/man/encoded.Rd +++ b/src/library/tools/man/encoded.Rd @@ -34,7 +34,7 @@ encoded_text_to_latex(x, \code{\link{iconv}} } \examples{ -x <- "fa\xE7ile" +x <- "fran\xE7ais" encoded_text_to_latex(x, "latin1") \dontrun{ ## create a tex file to show the upper half of 8-bit charsets diff --git a/src/library/tools/man/parseLatex.Rd b/src/library/tools/man/parseLatex.Rd index 9b1e091129e..433defa3206 100644 --- a/src/library/tools/man/parseLatex.Rd +++ b/src/library/tools/man/parseLatex.Rd @@ -1,6 +1,6 @@ % File src/library/tools/man/parseLatex.Rd % Part of the R package, https://www.R-project.org -% Copyright 1995-2013 R Core Team +% Copyright 1995-2023 R Core Team % Distributed under GPL 2 or later \name{parseLatex} @@ -72,7 +72,7 @@ The \code{latexToUtf8()} function returns a modified version of the Duncan Murdoch } \examples{\donttest{ -latex <- parseLatex("fa\\\\c{c}ile") +latex <- parseLatex("fran\\\\c{c}ais") deparseLatex(latexToUtf8(latex)) }} \keyword{ utilities } diff --git a/src/library/tools/man/showNonASCII.Rd b/src/library/tools/man/showNonASCII.Rd index af2d766dd20..56cce5b1d32 100644 --- a/src/library/tools/man/showNonASCII.Rd +++ b/src/library/tools/man/showNonASCII.Rd @@ -1,6 +1,6 @@ % File src/library/tools/man/showNonASCII.Rd % Part of the R package, https://www.R-project.org -% Copyright 2008-11 R Core Team +% Copyright 2008-2023 R Core Team % Distributed under GPL 2 or later \name{showNonASCII} @@ -34,7 +34,7 @@ showNonASCIIfile(file) } \examples{ out <- c( -"fa\xE7ile test of showNonASCII():", +"fran\xE7ais: test of showNonASCII():", "\\\\details{", " This is a good line", " This has an \xfcmlaut in it.", diff --git a/tests/Examples/tools-Ex.Rout.save b/tests/Examples/tools-Ex.Rout.save index 818fdab40df..5a643ee1a76 100644 --- a/tests/Examples/tools-Ex.Rout.save +++ b/tests/Examples/tools-Ex.Rout.save @@ -1,7 +1,7 @@ -R Under development (unstable) (2022-05-29 r82419) -- "Unsuffered Consequences" -Copyright (C) 2022 The R Foundation for Statistical Computing -Platform: aarch64-apple-darwin21.5.0 (64-bit) +R Under development (unstable) (2023-07-11 r84677) -- "Unsuffered Consequences" +Copyright (C) 2023 The R Foundation for Statistical Computing +Platform: aarch64-apple-darwin22.5.0 R is free software and comes with ABSOLUTELY NO WARRANTY. You are welcome to redistribute it under certain conditions. @@ -204,7 +204,7 @@ Error in assertWarning(ff()) : > bibstyle("unsorted", sortKeys = function(refs) seq_along(refs), + fmtPrefix = function(paper) paste0("[", paper$.index, "]"), + .init = TRUE) - + > print(refs, .bibstyle = "unsorted") [1] R Core Team (2013). _R: A Language and Environment for Statistical Computing_. R Foundation for Statistical Computing, Vienna, Austria. @@ -533,9 +533,9 @@ attr(,"match.length") > > ### ** Examples > -> x <- "fa\xE7ile" +> x <- "fran\xE7ais" > encoded_text_to_latex(x, "latin1") -[1] "fa{\\c c}ile" +[1] "fran{\\c c}ais" > ## Not run: > ##D ## create a tex file to show the upper half of 8-bit charsets > ##D x <- rawToChar(as.raw(160:255), multiple = TRUE) @@ -830,7 +830,7 @@ function (x, ...) > ### ** Examples > > out <- c( -+ "fa\xE7ile test of showNonASCII():", ++ "fran\xE7ais: test of showNonASCII():", + "\\details{", + " This is a good line", + " This has an \xfcmlaut in it.", @@ -840,7 +840,7 @@ function (x, ...) > cat(out, file = f, sep = "\n") > > showNonASCIIfile(f) -1: faile test of showNonASCII(): +1: franais: test of showNonASCII(): 4: This has an mlaut in it. > unlink(f) > @@ -974,6 +974,17 @@ An illustration of lexical scoping. > ## IGNORE_RDIFF_BEGIN > R_user_dir("FOO", "cache") [1] "/Users/ripley/Library/Caches/org.R-project.R/R/FOO" +> ## Create one, platform agnostically, must work if : +> (Rdb <- R_user_dir("base")) +[1] "/Users/ripley/Library/Application Support/org.R-project.R/R/base" +> if(noD <- !dir.exists(Rdb)) # should work user specifically: ++ dir.create(Rdb, recursive=TRUE) +> stopifnot(dir.exists(Rdb)) # "everywhere" +> dir(Rdb) # typically empty +character(0) +> if(noD) unlink(Rdb) # cleaning up +> list.files(R_user_dir("grid"), full.names = TRUE) +character(0) > ## IGNORE_RDIFF_END > > @@ -1118,7 +1129,7 @@ needs Deep Thought > cleanEx() > options(digits = 7L) > base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n") -Time elapsed: 0.135 0.011 0.147 0 0 +Time elapsed: 0.132 0.012 0.145 0 0 > grDevices::dev.off() null device 1