iu9-ca-web-chat/src/http_server/nytl_tests/test0.cpp

17 lines
549 B
C++
Raw Normal View History

#include <new_york_transit_line/templater.h>
/* Yep, tests for nytl depend on assets for website. Yep, I see no problem with that */
int main(int argc, char** argv) {
if (argc < 2) {
fprintf(stderr, "Usage: test assets_dir");
exit(1);
}
std::string dir_path = argv[1];
nytl::Templater templater(nytl::TemplaterSettings{nytl::TemplaterDetourRules{dir_path}});
templater.update();
std::string answer = templater.render("chat", {});
printf("%s\n<a><f><t><e><r><><l><f>\n", answer.c_str());
return 0;
}