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