diff --git a/tests/code_layout/CMakeLists.txt b/tests/code_layout/CMakeLists.txt index a7449603a47..713e49bdd15 100644 --- a/tests/code_layout/CMakeLists.txt +++ b/tests/code_layout/CMakeLists.txt @@ -8,7 +8,7 @@ ADD_TEST(qgis_sipify ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sipify.sh) ADD_TEST(qgis_sip_include ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sip_include.sh) ADD_TEST(qgis_sip_uptodate ${CMAKE_SOURCE_DIR}/tests/code_layout/test_sipfiles_uptodate.sh) -ADD_TEST(qgis_doxygen_order ${CMAKE_SOURCE_DIR}/tests/code_layout/test_doxygen_order.sh) +ADD_TEST(qgis_doxygen_order ${CMAKE_SOURCE_DIR}/tests/code_layout/test_doxygen_layout.sh) IF (WITH_APIDOC) INCLUDE(UsePythonTest) diff --git a/tests/code_layout/test_doxygen_order.sh b/tests/code_layout/test_doxygen_layout.sh similarity index 56% rename from tests/code_layout/test_doxygen_order.sh rename to tests/code_layout/test_doxygen_layout.sh index 7f16a891276..35814fbc8f4 100755 --- a/tests/code_layout/test_doxygen_order.sh +++ b/tests/code_layout/test_doxygen_layout.sh @@ -7,3 +7,10 @@ if [[ ! -z $output ]]; then echo -e "\n\x1B[31m*** Docstring computation: \\\return(s) should be placed before \\\note and \\since\x1B[0m" exit 1 fi + +# code snippets command +output=$(unbuffer ag --noaffinity --file-search-regex '\.h$' --multiline '~~~\{\.\w+\}' ${TRAVIS_BUILD_DIR} | tee /dev/stderr) +if [[ ! -z $output ]]; then + echo -e "\n\x1B[31m*** Docstring computation: code snippets should use \\\code{.xx} rather than ~~~{.xx} \x1B[0m" + exit 1 +fi