Fixed tests.
continuous-integration/drone/push Build is passing Details

The tests moved into a subdirectory recently, that's why ctest didn't
test anything and I didn't notice that the tests fail. Everything is
good again. :-)
This commit is contained in:
tastytea 2019-05-26 16:44:53 +02:00
parent 5b19404f89
commit 5730b5fde9
Signed by: tastytea
GPG Key ID: CFC39497F1B26E07
4 changed files with 10 additions and 8 deletions

View File

@ -37,7 +37,7 @@ steps:
- cmake -DCMAKE_INSTALL_PREFIX=/usr -DWITH_TESTS=YES -DWITH_MOZILLA=YES .. - cmake -DCMAKE_INSTALL_PREFIX=/usr -DWITH_TESTS=YES -DWITH_MOZILLA=YES ..
- make VERBOSE=1 - make VERBOSE=1
- make install DESTDIR=install - make install DESTDIR=install
- ctest -V - cd tests && ctest -V
volumes: volumes:
- name: debian-package-cache - name: debian-package-cache
path: /var/cache/apt/archives path: /var/cache/apt/archives

View File

@ -106,8 +106,8 @@ cmake --build .
** `-DWITH_DEB=YES` if you want to be able to generate a deb-package. ** `-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. ** `-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 You can run the tests with `cd tests && ctest`. Install with `make install`,
`make install`, generate binary packages with `make package`. generate binary packages with `make package`.
== Browser plugins == Browser plugins

View File

@ -58,9 +58,9 @@ SCENARIO ("The AsciiDoc export works correctly")
const regex re_dates const regex re_dates
("== 1970-01-01\n\n" ("== 1970-01-01\n\n"
"\\[\\[dt_1970-01-01T\\d{2}:\\d{2}:\\d{2}\\]\\]\n" "\\[\\[dt_1970-01-01T\\d{2}:\\d{2}:\\d{2}\\]\\]\n"
"\\.link:https://example\\.com/page\\.html\\[Nice title\\]\n" "\\* link:https://example\\.com/page\\.html\\[Nice title\\]"
"_\\d{2}:\\d{2}:\\d{2}_\n" " \\+\n_\\d{2}:\\d{2}_\n"
"| xref:t_tag1\\[tag1\\], xref:t_tag2\\[tag2\\]\n\n" "| xref:t_tag1\\[tag1\\], xref:t_tag2\\[tag2\\] +\n"
"Good description\\.\n"); "Good description\\.\n");
const regex re_tags const regex re_tags
("== Tags\n\n" ("== Tags\n\n"
@ -73,6 +73,7 @@ SCENARIO ("The AsciiDoc export works correctly")
if (!regex_search(adoc, re)) if (!regex_search(adoc, re))
{ {
adoc_ok = false; adoc_ok = false;
break;
} }
} }
} }

View File

@ -58,14 +58,15 @@ SCENARIO ("The Bookmarks export works correctly")
"<DL><p>\n<DT><H3>remwharead</H3>\n<DL><p>"); "<DL><p>\n<DT><H3>remwharead</H3>\n<DL><p>");
const regex re_bottom( const regex re_bottom(
"<DT><A HREF=\"https://example.com/page.html\" " "<DT><A HREF=\"https://example.com/page.html\" "
"ADD_DATE=\"\\d{10,}\">Nice title</A>\n" "ADD_DATE=\"\\d+\">Nice title</A>\n"
"</DL><p>\n</DL><p>\n$"); "</DL><p>\n</DL><p>\n");
for (const regex &re : { re_top, re_bottom }) for (const regex &re : { re_top, re_bottom })
{ {
if (!regex_search(bookmarks, re)) if (!regex_search(bookmarks, re))
{ {
bookmarks_ok = false; bookmarks_ok = false;
break;
} }
} }
} }