Skip to content

Commit

Permalink
curtail test script output
Browse files Browse the repository at this point in the history
  • Loading branch information
rsbivand committed Sep 3, 2024
1 parent 011fe1c commit 1764975
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 24 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rgrass
Version: 0.4-3
Date: 2024-06-19
Version: 0.4-4
Date: 2024-09-03
Title: Interface Between 'GRASS' Geographical Information System and 'R'
Authors@R: c(
person("Roger", "Bivand", role = c("cre", "aut"), email = "[email protected]", comment=c(ORCID="0000-0003-2392-6140")),
Expand Down
8 changes: 5 additions & 3 deletions tests/test_XML_xml2.R
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
library(rgrass)
suppressPackageStartupMessages(library(rgrass))
## IGNORE_RDIFF_BEGIN
old <- readRDS(system.file("etc/XML.r.out.gdal.rds", package = "rgrass"))
if (nchar(Sys.getenv("GISRC")) > 0) {
new <- parseGRASS("r.out.gdal")
all.equal(old, new)
stopifnot(isTRUE(all.equal(old, new)))
}
old <- readRDS(system.file("etc/res_r.water.outlet.rds", package = "rgrass"))
if (nchar(Sys.getenv("GISRC")) > 0) {
new <- parseGRASS("r.water.outlet")
all.equal(old, new)
stopifnot(isTRUE(all.equal(old, new)))
}
## IGNORE_RDIFF_END
18 changes: 8 additions & 10 deletions tests/test_XML_xml2.Rout.save
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

R version 4.3.3 (2024-02-29) -- "Angel Food Cake"
R Under development (unstable) (2024-09-03 r87091) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
Platform: x86_64-pc-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Expand All @@ -15,22 +15,20 @@ 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(rgrass)
GRASS GIS interface loaded with GRASS version: GRASS 8.3.2 (2024)
and location: nc_basic_spm_grass7
> old <- readRDS(system.file("etc/XML.r.out.gdal.rds", package="rgrass"))
> suppressPackageStartupMessages(library(rgrass))
> ## IGNORE_RDIFF_BEGIN
> old <- readRDS(system.file("etc/XML.r.out.gdal.rds", package = "rgrass"))
> if (nchar(Sys.getenv("GISRC")) > 0) {
+ new <- parseGRASS("r.out.gdal")
+ all.equal(old, new)
+ }
[1] TRUE
> old <- readRDS(system.file("etc/res_r.water.outlet.rds", package="rgrass"))
> old <- readRDS(system.file("etc/res_r.water.outlet.rds", package = "rgrass"))
> if (nchar(Sys.getenv("GISRC")) > 0) {
+ new <- parseGRASS("r.water.outlet")
+ all.equal(old, new)
+ }
[1] TRUE
> ## IGNORE_RDIFF_END
>
> proc.time()
user system elapsed
0.338 0.060 0.390
0.169 0.045 0.207
2 changes: 1 addition & 1 deletion tests/test_terra_ptr.R
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
library(rgrass)
suppressPackageStartupMessages(library(rgrass))
if (requireNamespace("terra", quietly = TRUE)) {
f <- system.file("ex/elev.tif", package = "terra")
SG <- terra::rast(f)
Expand Down
14 changes: 6 additions & 8 deletions tests/test_terra_ptr.Rout.save
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

R version 4.3.3 (2024-02-29) -- "Angel Food Cake"
R Under development (unstable) (2024-09-03 r87091) -- "Unsuffered Consequences"
Copyright (C) 2024 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
Platform: x86_64-pc-linux-gnu

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Expand All @@ -15,11 +15,9 @@ 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(rgrass)
GRASS GIS interface loaded with GRASS version: GRASS 8.3.2 (2024)
and location: nc_basic_spm_grass7
> if (requireNamespace("terra", quietly=TRUE)) {
+ f <- system.file("ex/elev.tif", package="terra")
> suppressPackageStartupMessages(library(rgrass))
> if (requireNamespace("terra", quietly = TRUE)) {
+ f <- system.file("ex/elev.tif", package = "terra")
+ SG <- terra::rast(f)
+ if (packageVersion("terra") < "1.7.46") {
+ bb <- getMethod("ext", "SpatRaster")(SG)@ptr$vector
Expand All @@ -31,4 +29,4 @@ and location: nc_basic_spm_grass7
>
> proc.time()
user system elapsed
3.525 0.082 3.615
2.479 0.070 2.551

0 comments on commit 1764975

Please sign in to comment.