[GRASS-SVN] r65487 - in grass/trunk/vector/v.edit: . testsuite

svn_grass at osgeo.org svn_grass at osgeo.org
Tue Jun 16 08:28:29 PDT 2015


Author: wenzeslaus
Date: 2015-06-16 08:28:29 -0700 (Tue, 16 Jun 2015)
New Revision: 65487

Added:
   grass/trunk/vector/v.edit/testsuite/
   grass/trunk/vector/v.edit/testsuite/select_all_flag.sh
Log:
v.edit: simple Bash test case for selecting all features (#2309)

Added: grass/trunk/vector/v.edit/testsuite/select_all_flag.sh
===================================================================
--- grass/trunk/vector/v.edit/testsuite/select_all_flag.sh	                        (rev 0)
+++ grass/trunk/vector/v.edit/testsuite/select_all_flag.sh	2015-06-16 15:28:29 UTC (rev 65487)
@@ -0,0 +1,35 @@
+#!/usr/bin/env bash
+
+# this is testtest for #2309
+# Add a select all flag to v.edit
+# https://trac.osgeo.org/grass/ticket/2309
+
+set -e
+set -x
+
+v.in.ascii input=- output=vedit_test separator=comma <<EOF
+913240.0,250614.0
+913250.0,250628.0
+EOF
+v.edit -r map=vedit_test tool=catadd layer=2 cats=10
+
+expected="10
+10"
+out=$(v.category option=print layer=2 input=vedit_test)
+
+if [[ ${out} != "${expected}" ]]; then
+    echo "FAIL: Expected '${expected}' not equals to output '${out}'"
+    exit 1
+fi
+
+# test also the original categories
+expected="1
+2"
+out=$(v.category option=print layer=1 input=vedit_test)
+
+if [[ ${out} != "${expected}" ]]; then
+    echo "FAIL: Expected '${expected}' not equals to output '${out}'"
+    exit 1
+fi
+
+g.remove -f type=vector name=vedit_test


Property changes on: grass/trunk/vector/v.edit/testsuite/select_all_flag.sh
___________________________________________________________________
Added: svn:executable
   + *



More information about the grass-commit mailing list