[med-svn] [Git][med-team/gjh-asl-json][master] add tests

Andrei Rozanski gitlab at salsa.debian.org
Wed Oct 7 18:18:42 BST 2020



Andrei Rozanski pushed to branch master at Debian Med / gjh-asl-json


Commits:
51c50a84 by Andrei Rozanski at 2020-10-07T19:12:15+02:00
add tests

- - - - -


3 changed files:

- + debian/examples
- debian/tests/control
- debian/tests/run-unit-test


Changes:

=====================================
debian/examples
=====================================
@@ -0,0 +1 @@
+tests/*


=====================================
debian/tests/control
=====================================
@@ -1,3 +1,3 @@
 Tests: run-unit-test
-Depends: @
+Depends: @, python
 Restrictions: allow-stderr


=====================================
debian/tests/run-unit-test
=====================================
@@ -13,4 +13,43 @@ cp -a /usr/share/doc/${pkg}/examples/* "${AUTOPKGTEST_TMP}"
 
 cd "${AUTOPKGTEST_TMP}"
 
-#do_stuff_to_test_package#
+# stub1.nl
+! test -f stub1.json
+cmd="/usr/bin/gjh_asl_json stub1.nl"
+echo "Testing command: ${cmd}"
+${cmd}
+test -f stub1.json
+python -c "import json; f = open('stub1.json'); json.load(f); f.close()"
+rm -f stub1.json
+
+# stub1.nl with -s
+! test -f stub1.json
+! test -f stub1.sol
+cmd="/usr/bin/gjh_asl_json -s stub1.nl"
+echo "Testing command: ${cmd}"
+${cmd}
+test -f stub1.json
+test -f stub1.sol
+python -c "import json; f = open('stub1.json'); json.load(f); f.close()"
+rm -f stub1.json
+rm -f stub1.sol
+
+# stub1.nl with row and col labels
+! test -f stub1.json
+cmd="/usr/bin/gjh_asl_json stub1.nl rows=stub1.row cols=stub1.col"
+echo "Testing command: ${cmd}"
+${cmd}
+test -f stub1.json
+python -c "import json; f = open('stub1.json'); json.load(f); f.close()"
+rm -f stub1.json
+
+# stub2.nl
+rm -f stub2.json
+! test -f stub2.json
+cmd="/usr/bin/gjh_asl_json stub2.nl"
+echo "Testing command: ${cmd}"
+${cmd}
+test -f stub2.json
+python -c "import json; f = open('stub2.json'); json.load(f); f.close()"
+
+rm -f stub2.json



View it on GitLab: https://salsa.debian.org/med-team/gjh-asl-json/-/commit/51c50a84b18f925ed72a4e2128a14ff0bd5afaf4

-- 
View it on GitLab: https://salsa.debian.org/med-team/gjh-asl-json/-/commit/51c50a84b18f925ed72a4e2128a14ff0bd5afaf4
You're receiving this email because of your account on salsa.debian.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20201007/f55abc5b/attachment-0001.html>


More information about the debian-med-commit mailing list