Skip to content

Commit

Permalink
r84664 part II
Browse files Browse the repository at this point in the history
git-svn-id: https://svn.r-project.org/R/trunk@84678 00db46b3-68df-0310-9c12-caf00c1e9a41
  • Loading branch information
ripley committed Jul 11, 2023
1 parent 021f210 commit 22bbb77
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 16 deletions.
4 changes: 2 additions & 2 deletions src/library/base/man/Encoding.Rd
Original file line number Diff line number Diff line change
@@ -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}
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion src/library/tools/man/encoded.Rd
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/library/tools/man/parseLatex.Rd
Original file line number Diff line number Diff line change
@@ -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}
Expand Down Expand Up @@ -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 }
Expand Down
4 changes: 2 additions & 2 deletions src/library/tools/man/showNonASCII.Rd
Original file line number Diff line number Diff line change
@@ -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}
Expand Down Expand Up @@ -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.",
Expand Down
29 changes: 20 additions & 9 deletions tests/Examples/tools-Ex.Rout.save
Original file line number Diff line number Diff line change
@@ -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.
Expand Down Expand Up @@ -204,7 +204,7 @@ Error in assertWarning(ff()) :
> bibstyle("unsorted", sortKeys = function(refs) seq_along(refs),
+ fmtPrefix = function(paper) paste0("[", paper$.index, "]"),
+ .init = TRUE)
<environment: 0x12a8be408>
<environment: 0x126cbf4f8>
> print(refs, .bibstyle = "unsorted")
[1] R Core Team (2013). _R: A Language and Environment for Statistical
Computing_. R Foundation for Statistical Computing, Vienna, Austria.
Expand Down Expand Up @@ -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)
Expand Down Expand Up @@ -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.",
Expand All @@ -840,7 +840,7 @@ function (x, ...)
> cat(out, file = f, sep = "\n")
>
> showNonASCIIfile(f)
1: fa<e7>ile test of showNonASCII():
1: fran<e7>ais: test of showNonASCII():
4: This has an <fc>mlaut in it.
> unlink(f)
>
Expand Down Expand Up @@ -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 <normal> :
> (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
>
>
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 22bbb77

Please sign in to comment.