2024-08-12 16:43:35 +00:00
|
|
|
#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());
|
2024-08-12 22:06:50 +00:00
|
|
|
std::string answer2 = templater.render("test", {});
|
|
|
|
printf("%s\n<a><f><t><e><r><><l><f>\n", answer.c_str());
|
|
|
|
|
2024-08-12 16:43:35 +00:00
|
|
|
return 0;
|
|
|
|
}
|