Compare commits
13 Commits
Author | SHA1 | Date | |
---|---|---|---|
449e315397 | |||
7eae29031f | |||
531a409124 | |||
22a50ef661 | |||
94555621d8 | |||
cfe274f1e1 | |||
eb4630d738 | |||
bbc412db45 | |||
c0a2f7e779 | |||
4b5e6898cd | |||
c16265683f | |||
d438e2292f | |||
089eac4cfc |
|
@ -1,4 +1,3 @@
|
||||||
# -*- mode: conf; fill-column: 100; -*-
|
|
||||||
# Written for clang-tidy 14.
|
# Written for clang-tidy 14.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
@ -46,6 +45,10 @@ CheckOptions: # ↓ Clashes with static private member prefix. (static int _va
|
||||||
- { key: readability-identifier-naming.EnumCase, value: lower_case }
|
- { key: readability-identifier-naming.EnumCase, value: lower_case }
|
||||||
- { key: readability-identifier-naming.FunctionCase, value: lower_case }
|
- { key: readability-identifier-naming.FunctionCase, value: lower_case }
|
||||||
- { key: readability-identifier-naming.ParameterCase, value: lower_case }
|
- { key: readability-identifier-naming.ParameterCase, value: lower_case }
|
||||||
|
|
||||||
|
- { key: readability-function-cognitive-complexity.Threshold, value: 30 }
|
||||||
|
- { key: readability-identifier-length.MinimumVariableNameLength, value: 2 }
|
||||||
...
|
...
|
||||||
|
|
||||||
# vim: set et tw=100:
|
# -*- mode: yaml; fill-column: 100; -*-
|
||||||
|
# vim: set fenc=utf-8 tw=100 et ft=yaml:
|
||||||
|
|
5
.cmake-format.json
Normal file
5
.cmake-format.json
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
{
|
||||||
|
"format": {
|
||||||
|
"disable": true
|
||||||
|
}
|
||||||
|
}
|
14
.drone.yml
14
.drone.yml
|
@ -155,7 +155,7 @@ steps:
|
||||||
- rm /etc/apt/apt.conf.d/docker-clean
|
- rm /etc/apt/apt.conf.d/docker-clean
|
||||||
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qq build-essential cmake clang locales lsb-release
|
- apt-get install -qq build-essential cmake clang locales lsb-release file
|
||||||
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json3-dev
|
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json3-dev
|
||||||
- apt-get install -qq --no-install-recommends asciidoc xsltproc
|
- apt-get install -qq --no-install-recommends asciidoc xsltproc
|
||||||
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
|
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
|
||||||
|
@ -181,7 +181,7 @@ steps:
|
||||||
- rm /etc/apt/apt.conf.d/docker-clean
|
- rm /etc/apt/apt.conf.d/docker-clean
|
||||||
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qq build-essential cmake clang locales lsb-release
|
- apt-get install -qq build-essential cmake clang locales lsb-release file
|
||||||
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json-dev
|
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json-dev
|
||||||
- apt-get install -qq --no-install-recommends asciidoc xsltproc
|
- apt-get install -qq --no-install-recommends asciidoc xsltproc
|
||||||
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
|
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
|
||||||
|
@ -208,7 +208,7 @@ steps:
|
||||||
- rm /etc/apt/apt.conf.d/docker-clean
|
- rm /etc/apt/apt.conf.d/docker-clean
|
||||||
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qq build-essential cmake clang locales lsb-release
|
- apt-get install -qq build-essential cmake clang locales lsb-release file
|
||||||
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json3-dev
|
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json3-dev
|
||||||
- apt-get install -qq --no-install-recommends asciidoc xsltproc
|
- apt-get install -qq --no-install-recommends asciidoc xsltproc
|
||||||
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
|
- rm -rf build_deb && mkdir -p build_deb && cd build_deb
|
||||||
|
@ -246,7 +246,7 @@ steps:
|
||||||
- rm /etc/apt/apt.conf.d/docker-clean
|
- rm /etc/apt/apt.conf.d/docker-clean
|
||||||
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
- alias apt-get='rm -f /var/cache/apt/archives/lock && apt-get'
|
||||||
- apt-get update -q
|
- apt-get update -q
|
||||||
- apt-get install -qq g++-8 build-essential clang locales lsb-release
|
- apt-get install -qq g++-8 build-essential clang locales lsb-release file
|
||||||
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json-dev
|
- apt-get install -qq libboost-program-options-dev libboost-locale-dev libboost-regex-dev libboost-log-dev gettext libarchive-dev libfmt-dev libpugixml-dev nlohmann-json-dev
|
||||||
- apt-get install -qq --no-install-recommends asciidoc xsltproc
|
- apt-get install -qq --no-install-recommends asciidoc xsltproc
|
||||||
- sh cmake_installer.sh --skip-license --exclude-subdir --prefix=/usr/local
|
- sh cmake_installer.sh --skip-license --exclude-subdir --prefix=/usr/local
|
||||||
|
@ -304,6 +304,12 @@ steps:
|
||||||
- epubgrep-${DRONE_TAG}-0.x86_64.opensuse-$(lsb_release --release --short).rpm
|
- epubgrep-${DRONE_TAG}-0.x86_64.opensuse-$(lsb_release --release --short).rpm
|
||||||
checksum:
|
checksum:
|
||||||
- sha512
|
- sha512
|
||||||
|
depends_on:
|
||||||
|
- Debian bullseye
|
||||||
|
- Debian buster
|
||||||
|
- Ubuntu focal
|
||||||
|
- Ubuntu bionic
|
||||||
|
- openSUSE Leap 15
|
||||||
|
|
||||||
- name: notification
|
- name: notification
|
||||||
image: drillster/drone-email
|
image: drillster/drone-email
|
||||||
|
|
|
@ -5,7 +5,7 @@ set(CMAKE_BUILD_TYPE "Release" CACHE STRING "The type of build.")
|
||||||
set(XGETTEXT_CMD "xgettext" CACHE STRING "The command for xgettext.")
|
set(XGETTEXT_CMD "xgettext" CACHE STRING "The command for xgettext.")
|
||||||
|
|
||||||
project(epubgrep
|
project(epubgrep
|
||||||
VERSION 0.6.0
|
VERSION 0.6.2
|
||||||
DESCRIPTION "Search tool for EPUB e-books"
|
DESCRIPTION "Search tool for EPUB e-books"
|
||||||
HOMEPAGE_URL "https://schlomp.space/tastytea/epubgrep"
|
HOMEPAGE_URL "https://schlomp.space/tastytea/epubgrep"
|
||||||
LANGUAGES CXX)
|
LANGUAGES CXX)
|
||||||
|
|
21
README.adoc
21
README.adoc
|
@ -169,4 +169,25 @@ install ./epubgrep-*.rpm+++` or `+++dnf install ./epubgrep-*.rpm+++`.
|
||||||
* zipgrep from link:http://infozip.sourceforge.net/[unzip] can search EPUB files
|
* zipgrep from link:http://infozip.sourceforge.net/[unzip] can search EPUB files
|
||||||
but does not strip HTML and does not display page numbers or headings.
|
but does not strip HTML and does not display page numbers or headings.
|
||||||
|
|
||||||
|
== Performance
|
||||||
|
|
||||||
|
A test with a directory containing 3333 EPUBs and 6269 files in total showed
|
||||||
|
this difference between epubgrep-0.6.2 and ripgrep-all-0.9.6:
|
||||||
|
|
||||||
|
[source,shellsession]
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
% hyperfine "epubgrep 'floor' ~/Books" "rga 'floor' ~/Books"
|
||||||
|
Benchmark #1: epubgrep 'floor' ~/Books
|
||||||
|
Time (mean ± σ): 167.246 s ± 3.848 s [User: 176.251 s, System: 79.107 s]
|
||||||
|
Range (min … max): 161.533 s … 173.647 s 10 runs
|
||||||
|
|
||||||
|
Benchmark #2: rga 'floor' ~/Books
|
||||||
|
Time (mean ± σ): 9.219 s ± 0.506 s [User: 17.540 s, System: 12.773 s]
|
||||||
|
Range (min … max): 8.571 s … 9.923 s 10 runs
|
||||||
|
|
||||||
|
Summary
|
||||||
|
'rga 'floor' ~/Books' ran
|
||||||
|
18.14 ± 1.08 times faster than 'epubgrep 'floor' ~/Books'
|
||||||
|
--------------------------------------------------------------------------------
|
||||||
|
|
||||||
include::{uri-base}/raw/branch/main/CONTRIBUTING.adoc[]
|
include::{uri-base}/raw/branch/main/CONTRIBUTING.adoc[]
|
||||||
|
|
|
@ -295,8 +295,8 @@ std::vector<string> list_spine(const fs::path &filepath)
|
||||||
<< format(translate("{0:s} is damaged. Could not read spine. "
|
<< format(translate("{0:s} is damaged. Could not read spine. "
|
||||||
"Skipping file.\n")
|
"Skipping file.\n")
|
||||||
.str()
|
.str()
|
||||||
.data(),
|
.c_str(),
|
||||||
filepath);
|
filepath.c_str());
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
21
src/main.cpp
21
src/main.cpp
|
@ -126,8 +126,10 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
LOG(log::sev::error)
|
LOG(log::sev::error)
|
||||||
<< format(translate("Could not open {0:s}: {1:s}").str(),
|
<< format(translate("Could not open {0:s}: {1:s}")
|
||||||
e.path1(), e.what());
|
.str()
|
||||||
|
.c_str(),
|
||||||
|
e.path1().c_str(), e.what());
|
||||||
return_code = EXIT_FAILURE;
|
return_code = EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -176,8 +178,10 @@ int main(int argc, char *argv[])
|
||||||
{
|
{
|
||||||
LOG(log::sev::error)
|
LOG(log::sev::error)
|
||||||
<< std::strerror(errno) // FIXME: Not thread safe.
|
<< std::strerror(errno) // FIXME: Not thread safe.
|
||||||
<< format(translate(" (while opening {0:s})").str(),
|
<< format(translate(" (while opening {0:s})")
|
||||||
filepath);
|
.str()
|
||||||
|
.c_str(),
|
||||||
|
filepath.c_str());
|
||||||
return EXIT_FAILURE;
|
return EXIT_FAILURE;
|
||||||
}
|
}
|
||||||
catch (const boost::regex_error &e)
|
catch (const boost::regex_error &e)
|
||||||
|
@ -233,10 +237,11 @@ int main(int argc, char *argv[])
|
||||||
while (cancel.wait_for(std::chrono::seconds(opts.status_interval))
|
while (cancel.wait_for(std::chrono::seconds(opts.status_interval))
|
||||||
!= std::future_status::ready)
|
!= std::future_status::ready)
|
||||||
{
|
{
|
||||||
std::cerr
|
std::cerr << format(translate("{0:d} of {1:d} books searched.")
|
||||||
<< format(translate("{0:d} of {1:d} books searched.").str(),
|
.str()
|
||||||
books_searched, input_files.size())
|
.c_str(),
|
||||||
<< '\n';
|
books_searched, input_files.size())
|
||||||
|
<< '\n';
|
||||||
}
|
}
|
||||||
std::cerr << translate("All books searched.") << '\n';
|
std::cerr << translate("All books searched.") << '\n';
|
||||||
}};
|
}};
|
||||||
|
|
|
@ -45,7 +45,7 @@ void print_matches(const std::vector<search::match> &matches,
|
||||||
cout << termcolor::yellow;
|
cout << termcolor::yellow;
|
||||||
}
|
}
|
||||||
cout << format(translate(" In {0:s}: \n").str().c_str(),
|
cout << format(translate(" In {0:s}: \n").str().c_str(),
|
||||||
fs::relative(matches[0].filepath_epub));
|
fs::relative(matches[0].filepath_epub).c_str());
|
||||||
if (!opts.nocolor)
|
if (!opts.nocolor)
|
||||||
{
|
{
|
||||||
cout << termcolor::reset;
|
cout << termcolor::reset;
|
||||||
|
@ -169,17 +169,18 @@ void html_all(const std::vector<std::vector<search::match>> &matches_all,
|
||||||
if (!opts.no_fn_epub)
|
if (!opts.no_fn_epub)
|
||||||
{
|
{
|
||||||
cout << format(R"( <th id="file_path_{0:d}">{1:s}</th>)",
|
cout << format(R"( <th id="file_path_{0:d}">{1:s}</th>)",
|
||||||
count, translate("File path (in EPUB file)"))
|
count,
|
||||||
|
translate("File path (in EPUB file)").str().c_str())
|
||||||
<< '\n';
|
<< '\n';
|
||||||
}
|
}
|
||||||
cout << format(R"( <th id="headline_{0:d}">{1:s}</th>)", count,
|
cout << format(R"( <th id="headline_{0:d}">{1:s}</th>)", count,
|
||||||
translate("Last headline"))
|
translate("Last headline").str().c_str())
|
||||||
<< '\n'
|
<< '\n'
|
||||||
<< format(R"( <th id="page_{0:d}">{1:s}</th>)", count,
|
<< format(R"( <th id="page_{0:d}">{1:s}</th>)", count,
|
||||||
translate("Page number"))
|
translate("Page number").str().c_str())
|
||||||
<< '\n'
|
<< '\n'
|
||||||
<< format(R"( <th id="match_{0:d}">{1:s}</th>)", count,
|
<< format(R"( <th id="match_{0:d}">{1:s}</th>)", count,
|
||||||
translate("Match"))
|
translate("Match").str().c_str())
|
||||||
<< "\n </tr>\n";
|
<< "\n </tr>\n";
|
||||||
|
|
||||||
for (const auto &match : matches)
|
for (const auto &match : matches)
|
||||||
|
|
19
src/zip.cpp
19
src/zip.cpp
|
@ -56,7 +56,7 @@ std::vector<std::string> list(const fs::path &filepath)
|
||||||
"Skipping in-EPUB file.\n")
|
"Skipping in-EPUB file.\n")
|
||||||
.str()
|
.str()
|
||||||
.c_str(),
|
.c_str(),
|
||||||
filepath);
|
filepath.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
toc.emplace_back(in_epub_filepath);
|
toc.emplace_back(in_epub_filepath);
|
||||||
|
@ -84,7 +84,7 @@ std::string read_file(const fs::path &filepath, std::string_view entry_path)
|
||||||
"Skipping in-EPUB file.\n")
|
"Skipping in-EPUB file.\n")
|
||||||
.str()
|
.str()
|
||||||
.data(),
|
.data(),
|
||||||
filepath);
|
filepath.c_str());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
if (std::strcmp(path, entry_path.data()) == 0)
|
if (std::strcmp(path, entry_path.data()) == 0)
|
||||||
|
@ -99,9 +99,9 @@ std::string read_file(const fs::path &filepath, std::string_view entry_path)
|
||||||
{
|
{
|
||||||
close_file(zipfile, filepath);
|
close_file(zipfile, filepath);
|
||||||
|
|
||||||
throw exception{
|
throw exception{format(
|
||||||
format(translate("Could not read {0:s} in {1:s}.").str(),
|
translate("Could not read {0:s} in {1:s}.").str().c_str(),
|
||||||
entry_path, filepath.string())};
|
entry_path, filepath.string())};
|
||||||
}
|
}
|
||||||
|
|
||||||
close_file(zipfile, filepath);
|
close_file(zipfile, filepath);
|
||||||
|
@ -115,7 +115,7 @@ std::string read_file(const fs::path &filepath, std::string_view entry_path)
|
||||||
|
|
||||||
if (entry_path == "META-INF/container.xml")
|
if (entry_path == "META-INF/container.xml")
|
||||||
{ // File is probably not an EPUB.
|
{ // File is probably not an EPUB.
|
||||||
exception e{format(translate("{0:s} not found in {1:s}.").str(),
|
exception e{format(translate("{0:s} not found in {1:s}.").str().c_str(),
|
||||||
entry_path, filepath.string())};
|
entry_path, filepath.string())};
|
||||||
e.code = 1;
|
e.code = 1;
|
||||||
throw exception{e};
|
throw exception{e};
|
||||||
|
@ -145,7 +145,7 @@ struct archive *open_file(const fs::path &filepath)
|
||||||
{
|
{
|
||||||
close_file(zipfile, filepath);
|
close_file(zipfile, filepath);
|
||||||
|
|
||||||
exception e{format(translate("Could not open {0:s}.").str(),
|
exception e{format(translate("Could not open {0:s}.").str().c_str(),
|
||||||
filepath.string())};
|
filepath.string())};
|
||||||
e.code = 1;
|
e.code = 1;
|
||||||
throw exception{e};
|
throw exception{e};
|
||||||
|
@ -159,8 +159,9 @@ void close_file(struct archive *zipfile, const fs::path &filepath)
|
||||||
auto result{archive_read_free(zipfile)};
|
auto result{archive_read_free(zipfile)};
|
||||||
if (result != ARCHIVE_OK)
|
if (result != ARCHIVE_OK)
|
||||||
{
|
{
|
||||||
throw exception{format(translate("Could not close {0:s}.").str(),
|
throw exception{
|
||||||
filepath.string())};
|
format(translate("Could not close {0:s}.").str().c_str(),
|
||||||
|
filepath.string())};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -5,11 +5,16 @@ file(COPY "test.epub3" DESTINATION ${CMAKE_CURRENT_BINARY_DIR})
|
||||||
|
|
||||||
find_package(Catch2 CONFIG)
|
find_package(Catch2 CONFIG)
|
||||||
|
|
||||||
if(Catch2_FOUND) # Catch 2.x
|
if(Catch2_FOUND) # Catch 2.x / 3.x
|
||||||
include(Catch)
|
include(Catch)
|
||||||
add_executable(all_tests main.cpp ${sources_tests})
|
add_executable(all_tests main.cpp ${sources_tests})
|
||||||
target_link_libraries(all_tests
|
if(TARGET Catch2::Catch2WithMain) # Catch 3.x
|
||||||
PRIVATE Catch2::Catch2 ${PROJECT_NAME}_lib)
|
target_link_libraries(all_tests
|
||||||
|
PRIVATE Catch2::Catch2WithMain ${PROJECT_NAME}_lib)
|
||||||
|
else() # Catch 2.x
|
||||||
|
target_link_libraries(all_tests
|
||||||
|
PRIVATE Catch2::Catch2 ${PROJECT_NAME}_lib)
|
||||||
|
endif()
|
||||||
target_include_directories(all_tests PRIVATE "/usr/include/catch2")
|
target_include_directories(all_tests PRIVATE "/usr/include/catch2")
|
||||||
catch_discover_tests(all_tests EXTRA_ARGS "${EXTRA_TEST_ARGS}")
|
catch_discover_tests(all_tests EXTRA_ARGS "${EXTRA_TEST_ARGS}")
|
||||||
else() # Catch 1.x
|
else() # Catch 1.x
|
||||||
|
|
|
@ -1,3 +1,8 @@
|
||||||
#define CATCH_CONFIG_MAIN
|
#define CATCH_CONFIG_MAIN
|
||||||
|
|
||||||
#include <catch.hpp>
|
// catch 3 does not have catch.hpp anymore
|
||||||
|
#if __has_include(<catch.hpp>)
|
||||||
|
# include <catch.hpp>
|
||||||
|
#else
|
||||||
|
# include <catch_all.hpp>
|
||||||
|
#endif
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
#include "fs-compat.hpp"
|
#include "fs-compat.hpp"
|
||||||
#include "helpers.hpp"
|
#include "helpers.hpp"
|
||||||
|
|
||||||
#include <catch.hpp>
|
// catch 3 does not have catch.hpp anymore
|
||||||
|
#if __has_include(<catch.hpp>)
|
||||||
|
# include <catch.hpp>
|
||||||
|
#else
|
||||||
|
# include <catch_all.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
|
@ -2,7 +2,12 @@
|
||||||
#include "options.hpp"
|
#include "options.hpp"
|
||||||
#include "search.hpp"
|
#include "search.hpp"
|
||||||
|
|
||||||
#include <catch.hpp>
|
// catch 3 does not have catch.hpp anymore
|
||||||
|
#if __has_include(<catch.hpp>)
|
||||||
|
# include <catch.hpp>
|
||||||
|
#else
|
||||||
|
# include <catch_all.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
|
@ -2,7 +2,12 @@
|
||||||
#include "fs-compat.hpp"
|
#include "fs-compat.hpp"
|
||||||
#include "search.hpp"
|
#include "search.hpp"
|
||||||
|
|
||||||
#include <catch.hpp>
|
// catch 3 does not have catch.hpp anymore
|
||||||
|
#if __has_include(<catch.hpp>)
|
||||||
|
# include <catch.hpp>
|
||||||
|
#else
|
||||||
|
# include <catch_all.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
|
@ -2,7 +2,12 @@
|
||||||
#include "options.hpp"
|
#include "options.hpp"
|
||||||
#include "search.hpp"
|
#include "search.hpp"
|
||||||
|
|
||||||
#include <catch.hpp>
|
// catch 3 does not have catch.hpp anymore
|
||||||
|
#if __has_include(<catch.hpp>)
|
||||||
|
# include <catch.hpp>
|
||||||
|
#else
|
||||||
|
# include <catch_all.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
|
@ -1,7 +1,12 @@
|
||||||
#include "fs-compat.hpp"
|
#include "fs-compat.hpp"
|
||||||
#include "zip.hpp"
|
#include "zip.hpp"
|
||||||
|
|
||||||
#include <catch.hpp>
|
// catch 3 does not have catch.hpp anymore
|
||||||
|
#if __has_include(<catch.hpp>)
|
||||||
|
# include <catch.hpp>
|
||||||
|
#else
|
||||||
|
# include <catch_all.hpp>
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <clocale>
|
#include <clocale>
|
||||||
#include <exception>
|
#include <exception>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user