1 #include <catch2/catch.hpp> 4 #include "cetlib_except/exception.h" 5 #include "cetlib_except/exception_category_matcher.h" 15 auto const path =
"xyzzy"s;
17 CHECK(xyzzy.size() == 1);
18 CHECK(xyzzy.showenv() == path);
23 auto const path =
"/MISSING/"s;
26 cet::exception_category_matcher(
"getenv"));
32 CHECK(xyzzy.size() == 1);
33 CHECK(xyzzy.showenv().empty());
38 auto const path{
"/MISSING/"s};
40 CHECK(sp.size() == 1);
41 CHECK(sp.showenv() == path);
47 CHECK(sp.size() == 1);
48 CHECK(sp.showenv().empty());
70 CHECK_THROWS_MATCHES(sp.find_file(
""),
72 cet::exception_category_matcher(
"search_path"));
std::string to_string() const
path_tag_t const path_tag
TEST_CASE("Autodetect env")
cet::coded_exception< error, detail::translate > exception