[osmium-tool] 81/97: Provide some simple test cases.

Sebastiaan Couwenberg sebastic at moszumanska.debian.org
Tue Jul 21 20:15:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

sebastic pushed a commit to tag v1.0.0
in repository osmium-tool.

commit e10755bf29708eedeed2a2ce999fc97623768d5a
Author: Jochen Topf <jochen at topf.org>
Date:   Fri Jan 30 13:55:27 2015 +0100

    Provide some simple test cases.
---
 CMakeLists.txt | 20 ++++++++++++++++++++
 1 file changed, 20 insertions(+)

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d90d89a..4d6145c 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -184,6 +184,26 @@ configure_file(
 
 
 #-----------------------------------------------------------------------------
+#
+#  Tests
+#
+#-----------------------------------------------------------------------------
+
+enable_testing()
+
+function(do_test _name _command _regex)
+    separate_arguments(_command)
+    add_test(NAME ${_name} COMMAND ${_command})
+    set_tests_properties(${_name} PROPERTIES PASS_REGULAR_EXPRESSION ${_regex})
+endfunction()
+
+do_test(version  "osmium --version" "^osmium version ${OSMIUM_VERSION}\n")
+do_test(help     "osmium help"      "^Usage: .*Commands are:")
+do_test(help2    "osmium --help"    "^Usage: .*Commands are:")
+do_test(help_cat "osmium help cat"  "^OSMIUM-CAT\\(1\\)")
+
+
+#-----------------------------------------------------------------------------
 
 include_directories(${PROJECT_BINARY_DIR}/src)
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/osmium-tool.git



More information about the Pkg-grass-devel mailing list