diff --git a/.drone.yml b/.drone.yml index d78263f..c8715e1 100644 --- a/.drone.yml +++ b/.drone.yml @@ -37,7 +37,7 @@ steps: - cmake -DCMAKE_INSTALL_PREFIX=/usr -DWITH_TESTS=YES -DWITH_MOZILLA=YES .. - make VERBOSE=1 - make install DESTDIR=install - - ctest -V + - cd tests && ctest -V volumes: - name: debian-package-cache path: /var/cache/apt/archives diff --git a/README.adoc b/README.adoc index b4fde53..3709e6a 100644 --- a/README.adoc +++ b/README.adoc @@ -106,8 +106,8 @@ cmake --build . ** `-DWITH_DEB=YES` if you want to be able to generate a deb-package. ** `-DWITH_RPM=YES` if you want to be able to generate an rpm-package. -You can run the tests with `ctest` inside the build directory. Install with -`make install`, generate binary packages with `make package`. +You can run the tests with `cd tests && ctest`. Install with `make install`, +generate binary packages with `make package`. == Browser plugins diff --git a/tests/test_adoc.cpp b/tests/test_adoc.cpp index 6391098..138c776 100644 --- a/tests/test_adoc.cpp +++ b/tests/test_adoc.cpp @@ -58,9 +58,9 @@ SCENARIO ("The AsciiDoc export works correctly") const regex re_dates ("== 1970-01-01\n\n" "\\[\\[dt_1970-01-01T\\d{2}:\\d{2}:\\d{2}\\]\\]\n" - "\\.link:https://example\\.com/page\\.html\\[Nice title\\]\n" - "_\\d{2}:\\d{2}:\\d{2}_\n" - "| xref:t_tag1\\[tag1\\], xref:t_tag2\\[tag2\\]\n\n" + "\\* link:https://example\\.com/page\\.html\\[Nice title\\]" + " \\+\n_\\d{2}:\\d{2}_\n" + "| xref:t_tag1\\[tag1\\], xref:t_tag2\\[tag2\\] +\n" "Good description\\.\n"); const regex re_tags ("== Tags\n\n" @@ -73,6 +73,7 @@ SCENARIO ("The AsciiDoc export works correctly") if (!regex_search(adoc, re)) { adoc_ok = false; + break; } } } diff --git a/tests/test_bookmarks.cpp b/tests/test_bookmarks.cpp index 25be499..a12039f 100644 --- a/tests/test_bookmarks.cpp +++ b/tests/test_bookmarks.cpp @@ -58,14 +58,15 @@ SCENARIO ("The Bookmarks export works correctly") "

\n

remwharead

\n

"); const regex re_bottom( "

Nice title\n" - "

\n

\n$"); + "ADD_DATE=\"\\d+\">Nice title\n" + "

\n

\n"); for (const regex &re : { re_top, re_bottom }) { if (!regex_search(bookmarks, re)) { bookmarks_ok = false; + break; } } }