@@ -16,6 +16,27 @@ function(check_sort1 _name _input _output _format)
16
16
check_output(sort ${_name} _mp "sort --generator=test -f ${_format} -s multipass sort/${_input} " "sort/${_output} " )
17
17
endfunction ()
18
18
19
+ function (check_sort_warning _name _input _format _expected_stderr)
20
+ set (_cmd "$<TARGET_FILE:osmium> sort --no-progress --generator=test sort/${_input} -f ${_format} -o /tmp/test-sort-warning-output.osm --overwrite" )
21
+ add_test (
22
+ NAME "sort-${_name} "
23
+ COMMAND ${CMAKE_COMMAND}
24
+ -D cmd:FILEPATH =${_cmd}
25
+ -D dir:PATH =${PROJECT_SOURCE_DIR} /test
26
+ -D expected_stderr:STRING =${_expected_stderr}
27
+ -P ${CMAKE_SOURCE_DIR} /test /sort /run_test_check_stderr.cmake
28
+ )
29
+ set (_cmd_mp "$<TARGET_FILE:osmium> sort --no-progress --generator=test -s multipass sort/${_input} -f ${_format} -o /tmp/test-sort-warning-output-mp.osm --overwrite" )
30
+ add_test (
31
+ NAME "sort-${_name} -mp"
32
+ COMMAND ${CMAKE_COMMAND}
33
+ -D cmd:FILEPATH =${_cmd_mp}
34
+ -D dir:PATH =${PROJECT_SOURCE_DIR} /test
35
+ -D expected_stderr:STRING =${_expected_stderr}
36
+ -P ${CMAKE_SOURCE_DIR} /test /sort /run_test_check_stderr.cmake
37
+ )
38
+ endfunction ()
39
+
19
40
20
41
#-----------------------------------------------------------------------------
21
42
@@ -32,4 +53,8 @@ check_sort1(mixed-metadata input-simple-onefile.osm output-simple-onefile.osm os
32
53
check_sort1(history-partially-only-version input -history-partially-only-version .osm output -history-partially-only-version .osm osm)
33
54
check_sort1(history-only-version input -history-only-version .osm output -history-only-version .osm osm)
34
55
56
+ check_sort_warning(warning-xml input -with-locations.osm xml "Warning! Input file contains locations on ways that will be lost in output." )
57
+ check_sort_warning(warning-pbf input -with-locations.osm pbf "Warning! Input file contains locations on ways that will be lost in output." )
58
+ check_sort_warning(warning-opl input -with-locations.osm opl "Warning! Input file contains locations on ways that will be lost in output." )
59
+
35
60
#-----------------------------------------------------------------------------
0 commit comments