diff options
author | Szczepan Zalega <szczepan@nitrokey.com> | 2019-05-06 13:21:29 +0200 |
---|---|---|
committer | Szczepan Zalega <szczepan@nitrokey.com> | 2019-05-06 13:21:29 +0200 |
commit | 4a0da78d76906f052642e19dedf72f18298e5f9c (patch) | |
tree | 1bb3c203b5e8231c2848760b2ff8026e29a93acc /unittest | |
parent | ed8af16e19fbfb727de647df738ccdcb3c6ac3b5 (diff) | |
parent | 8526b5a79795fe821749ecd985dc26fcf30728f9 (diff) | |
download | libnitrokey-4a0da78d76906f052642e19dedf72f18298e5f9c.tar.gz libnitrokey-4a0da78d76906f052642e19dedf72f18298e5f9c.tar.bz2 |
Merge branch 'pr_157'
Fix failing test, due to a new format coming from pre-release.
Fixes #157
Diffstat (limited to 'unittest')
-rw-r--r-- | unittest/test_offline.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/unittest/test_offline.cc b/unittest/test_offline.cc index 279c38f..320ad48 100644 --- a/unittest/test_offline.cc +++ b/unittest/test_offline.cc @@ -178,8 +178,8 @@ TEST_CASE("Test version getter", "[fast]") { // Optional <patch> field is allowed as well. INFO("This test will fail, if the full git commit version was not collected during library build."); std::string s = library_version; - std::string version("v[0-9]+\\.[0-9]+(\\.[0-9]+)?"); - std::string git_suffix("-[0-9]+-g[0-9a-z]+"); + std::string version("(pre-)?v[0-9]+\\.[0-9]+(\\.[0-9]+)?"); + std::string git_suffix("(-[0-9]+)+-g[0-9a-z]+"); std::regex pattern(version + "(" + git_suffix + ")?"); REQUIRE(std::regex_match(s, pattern)); } |