Browse Source

r.object.geometry: fix msg typo and test script (#1994)

* r.object.geometry: fix msg typo
* add missing r.in.ascii output type
Markus Neteler 3 years ago
parent
commit
230e5f157d

+ 1 - 1
raster/r.object.geometry/main.c

@@ -92,7 +92,7 @@ int main(int argc, char *argv[])
     in_fd = Rast_open_old(opt_in->answer, "");
     in_fd = Rast_open_old(opt_in->answer, "");
 
 
     if (Rast_get_map_type(in_fd) != CELL_TYPE)
     if (Rast_get_map_type(in_fd) != CELL_TYPE)
-        G_fatal_error(_("Input raster mus be of type CELL"));
+        G_fatal_error(_("Input raster must be of type CELL"));
 
 
     if (opt_out->answer != NULL && strcmp(opt_out->answer, "-") != 0) {
     if (opt_out->answer != NULL && strcmp(opt_out->answer, "-") != 0) {
         if (!(out_fp = fopen(opt_out->answer, "w")))
         if (!(out_fp = fopen(opt_out->answer, "w")))

+ 5 - 1
raster/r.object.geometry/testsuite/r_object_geometry_test.py

@@ -34,7 +34,11 @@ class TestObjectGeometryPixel(TestCase):
     def setUpClass(cls):
     def setUpClass(cls):
         """Imports test raster(s), ensures expected computational region and setup"""
         """Imports test raster(s), ensures expected computational region and setup"""
         cls.runModule(
         cls.runModule(
-            "r.in.ascii", input="-", stdin_=testraster1, output=cls.test_objects1
+            "r.in.ascii",
+            input="-",
+            type="CELL",
+            stdin_=testraster1,
+            output=cls.test_objects1,
         )
         )
         cls.use_temp_region()
         cls.use_temp_region()
         cls.runModule("g.region", raster=cls.test_objects1)
         cls.runModule("g.region", raster=cls.test_objects1)