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";
20 CHECK(!no_db
.open(no_database
));
21 CHECK(!no_db
.contains("foo"));
24 auto const accept_dom_path
= config_dir
/ "accept_domains";
26 CHECK(accept_dom
.open(accept_dom_path
.c_str()));
28 // Ug, should not need c_str() here:
29 std::ifstream
in(accept_dom_path
.c_str(), std::ios::in
| std::ios::binary
);
33 ("error while opening file "s
+ accept_dom_path
.string()).c_str());
38 perror(("error while reading file "s
+ accept_dom_path
.string()).c_str());
41 CHECK(accept_dom
.contains(line
));