[osmium-tool] 23/44: Add some tests for check-refs subcommand.

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


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

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

commit 6058b92d864f3ede4a02dfef5f043a53a7b72370
Author: Jochen Topf <jochen at topf.org>
Date:   Fri Jun 26 15:31:52 2015 +0200

    Add some tests for check-refs subcommand.
---
 test/CMakeLists.txt            |  1 +
 test/check-refs/CMakeLists.txt | 13 +++++++++++++
 test/check-refs/nw-okay.osm    | 15 +++++++++++++++
 test/check-refs/nwr-okay.osm   | 15 +++++++++++++++
 4 files changed, 44 insertions(+)

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b7632e2..49af1c5 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -32,6 +32,7 @@ endfunction()
 #-----------------------------------------------------------------------------
 
 add_subdirectory(cat)
+add_subdirectory(check-refs)
 add_subdirectory(fileinfo)
 add_subdirectory(help)
 add_subdirectory(time-filter)
diff --git a/test/check-refs/CMakeLists.txt b/test/check-refs/CMakeLists.txt
new file mode 100644
index 0000000..97bb832
--- /dev/null
+++ b/test/check-refs/CMakeLists.txt
@@ -0,0 +1,13 @@
+#-----------------------------------------------------------------------------
+#
+#  CMake Config
+#
+#  Osmium Tool Tests - check-refs
+#
+#-----------------------------------------------------------------------------
+
+add_test(NAME check-ref-nwr-okay COMMAND osmium check-refs -r ${CMAKE_SOURCE_DIR}/test/check-refs/nwr-okay.osm)
+add_test(NAME check-ref-nw-okay COMMAND osmium check-refs ${CMAKE_SOURCE_DIR}/test/check-refs/nw-okay.osm)
+
+
+#-----------------------------------------------------------------------------
diff --git a/test/check-refs/nw-okay.osm b/test/check-refs/nw-okay.osm
new file mode 100644
index 0000000..ef04af1
--- /dev/null
+++ b/test/check-refs/nw-okay.osm
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version="0.6" generator="testdata" upload="false">
+  <node id="10" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1" lat="1" lon="1"/>
+  <node id="11" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1" lat="2" lon="1"/>
+  <node id="12" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1" lat="3" lon="1"/>
+  <way id="20" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1">
+    <nd ref="10"/>
+    <nd ref="11"/>
+    <nd ref="12"/>
+  </way>
+  <relation id="30" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1">
+    <member type="n" ref="10"/>
+    <member type="w" ref="21"/>
+  </relation>
+</osm>
diff --git a/test/check-refs/nwr-okay.osm b/test/check-refs/nwr-okay.osm
new file mode 100644
index 0000000..88adf8c
--- /dev/null
+++ b/test/check-refs/nwr-okay.osm
@@ -0,0 +1,15 @@
+<?xml version='1.0' encoding='UTF-8'?>
+<osm version="0.6" generator="testdata" upload="false">
+  <node id="10" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1" lat="1" lon="1"/>
+  <node id="11" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1" lat="2" lon="1"/>
+  <node id="12" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1" lat="3" lon="1"/>
+  <way id="20" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1">
+    <nd ref="10"/>
+    <nd ref="11"/>
+    <nd ref="12"/>
+  </way>
+  <relation id="30" version="1" timestamp="2015-01-01T01:00:00Z" uid="1" user="test" changeset="1">
+    <member type="n" ref="10"/>
+    <member type="w" ref="20"/>
+  </relation>
+</osm>

-- 
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