errors during tests
fix following errors
── Test failures ─────────────────────────────────────────────────────────────────────────────────────────────── testthat ────
> library(testthat)
> library(r2ogs6)
Loading required package: foreach
r2ogs6 works best with its options set :)
For an overview, use the command 'options()[grepl("^r2ogs6", names(options()))]'
To set an option, use the command 'options("<option_name>" = <option_value>)'
>
> test_check("r2ogs6")
══ Skipped tests ═══════════════════════════════════════════════════════════════
• ogs executable not available for testing (2)
══ Warnings ════════════════════════════════════════════════════════════════════
── Warning (test-export_gml.R:8:5): export_gml works ───────────────────────────
cannot create dir '/export_gml_test', reason 'Permission denied'
Backtrace:
1. base::dir.create(test_path) test-export_gml.R:8:4
── Warning (test-sim_utils.R:58:5): ogs6_export_sim_files works ─────────────────────
cannot create dir '/export_all_sim_files_test', reason 'Permission denied'
Backtrace:
1. base::dir.create(test_path) test-sim_utils.R:58:4
── Warning (test-sim_utils.R:70:5): ogs6_export_sim_files works ─────────────────────
cannot create dir '/export_all_sim_files_test', reason 'Permission denied'
Backtrace:
1. r2ogs6::ogs6_export_sim_files(ogs6_obj) test-sim_utils.R:70:4
2. base::dir.create(ogs6_obj$sim_path)
══ Failed tests ════════════════════════════════════════════════════════════════
── Error (test-export_gml.R:26:5): export_gml works ────────────────────────────
Error: '/export_gml_test' does not exist.
Backtrace:
█
1. └─r2ogs6:::export_gml(test_gml, gml_path) test-export_gml.R:26:4
2. ├─xml2::write_xml(gml_xml, path, options = "format", encoding = "ISO-8859-1")
3. └─xml2:::write_xml.xml_document(...)
4. └─xml2:::path_to_connection(file, check = "dir")
5. ├─base::file.path(check_path(dirname(path)), basename(path))
6. └─xml2:::check_path(dirname(path))
── Failure (test-ogs6_vtu.R:27:5): OGS6_vtu initialization works ───────────────────────────
"vtkmodules.vtkCommonDataModel.vtkUnstructuredGrid" %in% class(vtu_obj$vtkUnstructuredGrid) not equal to TRUE.
1 element mismatch
── Error (test-sim_utils.R:70:5): ogs6_export_sim_files works ───────────────────────────
Error: '/export_all_sim_files_test' does not exist.
Backtrace:
█
1. └─r2ogs6::ogs6_export_sim_files(ogs6_obj) test-sim_utils.R:70:4
2. └─r2ogs6:::export_gml(ogs6_obj$gml, paste0(ogs6_obj$sim_path, basename(ogs6_obj$geometry)))
3. ├─xml2::write_xml(gml_xml, path, options = "format", encoding = "ISO-8859-1")
4. └─xml2:::write_xml.xml_document(...)
5. └─xml2:::path_to_connection(file, check = "dir")
6. ├─base::file.path(check_path(dirname(path)), basename(path))
7. └─xml2:::check_path(dirname(path))
[ FAIL 3 | WARN 3 | SKIP 2 | PASS 163 ]
Error: Test failures
Execution halted
1 error x | 0 warnings ✓ | 1 note x