Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
R
r2ogs6
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ogs
OpenGeoSys Tools
r2ogs6
Merge requests
!50
Add support for mesh files in MSH format
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Add support for mesh files in MSH format
67-feat_msh-file-support
into
master
Overview
0
Commits
7
Pipelines
0
Changes
2
Merged
Johannes Boog
requested to merge
67-feat_msh-file-support
into
master
2 years ago
Overview
0
Commits
7
Pipelines
0
Changes
2
Expand
class to represent MSH mesh files
Closes
#67 (closed)
0
0
Merge request reports
Viewing commit
8553f59b
Prev
Next
Show latest version
2 files
+
44
−
1
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
2
Search (e.g. *.vue) (Ctrl+P)
8553f59b
[test] read and export msh files
· 8553f59b
Johannes Boog
authored
2 years ago
tests/testthat/test-export_prj.R
+
26
−
0
Options
@@ -97,6 +97,32 @@ test_that("export_prj works for referenced *.dat files", {
unlink
(
test_path
,
recursive
=
TRUE
)
})
test_that
(
"export_prj works for referenced *.msh files"
,
{
# Get extdata directory and create folder for the test
extdata_path
<-
system.file
(
"extdata/"
,
package
=
"r2ogs6"
)
test_path
<-
paste0
(
extdata_path
,
"/export_prj_test"
)
dir.create
(
test_path
)
# Define prj_path and OGS6 object, then read in .prj file
ogs6_obj
<-
OGS6
$
new
(
sim_name
=
"t1_1Dsource"
,
sim_path
=
test_path
)
prj_path
<-
system.file
(
"extdata/benchmarks/t1_1Dsource"
,
"t1_1Dsource.prj"
,
package
=
"r2ogs6"
)
suppressWarnings
(
read_in_prj
(
ogs6_obj
,
prj_path
,
read_in_gml
=
F
))
# test with copying referenced files
export_prj
(
ogs6_obj
,
copy_ext_files
=
T
)
expect_equal
(
sort
(
list.files
(
ogs6_obj
$
sim_path
)),
sort
(
c
(
"t1_1Dsource.gml"
,
"t1_1Dsource.msh"
,
"t1_1Dsource.prj"
)))
# Tidy up by deleting the folder we created
unlink
(
test_path
,
recursive
=
TRUE
)
})
test_that
(
"export_prj works for process$include"
,
{
Loading