diff --git a/tests/test_search_helpers.cpp b/tests/test_search_helpers.cpp index 8554155..d9026a6 100644 --- a/tests/test_search_helpers.cpp +++ b/tests/test_search_helpers.cpp @@ -26,7 +26,7 @@ SCENARIO("Searching helpers work as intended") text = "Moss"; try { - epubgrep::search::cleanup_text(text); + text = epubgrep::search::cleanup_text(text).text; } catch (const std::exception &) { @@ -46,7 +46,7 @@ SCENARIO("Searching helpers work as intended") text = "šŸ’–\r\ršŸ¦"; try { - epubgrep::search::cleanup_text(text); + text = epubgrep::search::cleanup_text(text).text; } catch (const std::exception &) { @@ -66,7 +66,7 @@ SCENARIO("Searching helpers work as intended") text = "Moss\n\n\n\n\n\nis good."; try { - epubgrep::search::cleanup_text(text); + text = epubgrep::search::cleanup_text(text).text; } catch (const std::exception &) { @@ -91,8 +91,8 @@ SCENARIO("Searching helpers work as intended") text = "ā€¦

Soup

ā€¦"; try { - epubgrep::search::cleanup_text(text); - text = epubgrep::search::headline(text); + auto file{epubgrep::search::cleanup_text(text)}; + text = epubgrep::search::headline(file, text.size()); } catch (const std::exception &) { @@ -113,8 +113,8 @@ SCENARIO("Searching helpers work as intended") "road to nowhere ā€¦"; try { - epubgrep::search::cleanup_text(text); - text = epubgrep::search::headline(text); + auto file{epubgrep::search::cleanup_text(text)}; + text = epubgrep::search::headline(file, text.size()); } catch (const std::exception &) { @@ -134,8 +134,8 @@ SCENARIO("Searching helpers work as intended") text = "
The long
road to nowhere
"; try { - epubgrep::search::cleanup_text(text); - text = epubgrep::search::headline(text); + auto file{epubgrep::search::cleanup_text(text)}; + text = epubgrep::search::headline(file, text.size()); } catch (const std::exception &) { @@ -160,8 +160,8 @@ SCENARIO("Searching helpers work as intended") text = R"(ā€¦ ā€¦)"; try { - epubgrep::search::cleanup_text(text); - text = epubgrep::search::page(text); + auto file{epubgrep::search::cleanup_text(text)}; + text = epubgrep::search::page(file, text.size()); } catch (const std::exception &) { @@ -181,8 +181,8 @@ SCENARIO("Searching helpers work as intended") text = R"(ā€¦ ā€¦)"; try { - epubgrep::search::cleanup_text(text); - text = epubgrep::search::page(text); + auto file{epubgrep::search::cleanup_text(text)}; + text = epubgrep::search::page(file, text.size()); } catch (const std::exception &) {