5 #include <glog/logging.h>
12 using namespace std::string_literals
;
14 int main(int argc
, char* argv
[])
16 auto const config_dir
= osutil::get_config_dir();
18 auto const no_database
= config_dir
/ "unable-to-open-database";
19 CDB no_db
{no_database
};
20 CHECK(!no_db
.contains("foo"));
23 auto const accept_dom_path
= config_dir
/ "accept_domains";
25 CHECK(accept_dom
.open(accept_dom_path
.c_str()));
27 // Ug, should not need c_str() here:
28 std::ifstream
in(accept_dom_path
.c_str(), std::ios::in
| std::ios::binary
);
32 ("error while opening file "s
+ accept_dom_path
.string()).c_str());
37 perror(("error while reading file "s
+ accept_dom_path
.string()).c_str());
40 CHECK(accept_dom
.contains(line
));