Fix test, print exceptions.
This commit is contained in:
parent
2bede91fb7
commit
1e0cde8a4b
|
@ -6,6 +6,7 @@
|
|||
|
||||
#include <clocale>
|
||||
#include <exception>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
|
||||
|
@ -32,8 +33,9 @@ SCENARIO("Searching ZIP files works")
|
|||
opts.regex = epubgrep::options::regex_kind::extended;
|
||||
matches = epubgrep::search::search(zipfile, "📙+\\w?", opts);
|
||||
}
|
||||
catch (const std::exception &)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << "EXCEPTION: " << e.what() << '\n';
|
||||
exception = true;
|
||||
}
|
||||
|
||||
|
@ -53,8 +55,9 @@ SCENARIO("Searching ZIP files works")
|
|||
opts.context = 1;
|
||||
matches = epubgrep::search::search(zipfile, "📗", opts);
|
||||
}
|
||||
catch (const std::exception &)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << "EXCEPTION: " << e.what() << '\n';
|
||||
exception = true;
|
||||
}
|
||||
|
||||
|
@ -78,8 +81,9 @@ SCENARIO("Searching ZIP files works")
|
|||
matches = epubgrep::search::search(zipfile, R"([ \n])",
|
||||
opts);
|
||||
}
|
||||
catch (const std::exception &)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << "EXCEPTION: " << e.what() << '\n';
|
||||
exception = true;
|
||||
}
|
||||
|
||||
|
@ -114,12 +118,13 @@ SCENARIO("Searching ZIP files works")
|
|||
try
|
||||
{
|
||||
opts.context = 1;
|
||||
opts.regex = epubgrep::options::regex_kind::extended;
|
||||
opts.regex = epubgrep::options::regex_kind::perl;
|
||||
matches = epubgrep::search::search(
|
||||
zipfile, R"(work\s[\w]+\.\W[\w']+\Wstay)", opts);
|
||||
}
|
||||
catch (const std::exception &)
|
||||
catch (const std::exception &e)
|
||||
{
|
||||
std::cerr << "EXCEPTION: " << e.what() << '\n';
|
||||
exception = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user