Lines Matching refs:text

41 namespace text = utils::text;
56 do_test_ok(const text::templates_def& templates, const std::string& input_str, in do_test_ok()
62 text::instantiate(templates, input, output); in do_test_ok()
76 do_test_fail(const text::templates_def& templates, const std::string& input_str, in do_test_fail()
82 ATF_REQUIRE_THROW_RE(text::syntax_error, exp_message, in do_test_fail()
83 text::instantiate(templates, input, output)); in do_test_fail()
93 text::templates_def templates; in ATF_TEST_CASE_BODY()
102 text::templates_def templates; in ATF_TEST_CASE_BODY()
112 text::templates_def templates; in ATF_TEST_CASE_BODY()
116 ATF_REQUIRE_THROW(text::syntax_error, templates.get_variable("the-name")); in ATF_TEST_CASE_BODY()
123 text::templates_def templates; in ATF_TEST_CASE_BODY()
132 text::templates_def templates; in ATF_TEST_CASE_BODY()
144 text::templates_def templates; in ATF_TEST_CASE_BODY()
165 text::templates_def templates; in ATF_TEST_CASE_BODY()
177 text::templates_def templates; in ATF_TEST_CASE_BODY()
189 text::templates_def templates; in ATF_TEST_CASE_BODY()
200 text::templates_def templates; in ATF_TEST_CASE_BODY()
202 ATF_REQUIRE_THROW_RE(text::syntax_error, "Unknown variable 'foo '", in ATF_TEST_CASE_BODY()
210 text::templates_def templates; in ATF_TEST_CASE_BODY()
222 text::templates_def templates; in ATF_TEST_CASE_BODY()
224 ATF_REQUIRE_THROW_RE(text::syntax_error, "Unknown vector 'foo '", in ATF_TEST_CASE_BODY()
232 text::templates_def templates; in ATF_TEST_CASE_BODY()
243 text::templates_def templates; in ATF_TEST_CASE_BODY()
245 ATF_REQUIRE_THROW_RE(text::syntax_error, "Unknown variable 'foo1'", in ATF_TEST_CASE_BODY()
253 text::templates_def templates; in ATF_TEST_CASE_BODY()
271 text::templates_def templates; in ATF_TEST_CASE_BODY()
275 ATF_REQUIRE_THROW_RE(text::syntax_error, "Unknown vector 'fooz'", in ATF_TEST_CASE_BODY()
283 text::templates_def templates; in ATF_TEST_CASE_BODY()
287 ATF_REQUIRE_THROW_RE(text::syntax_error, "Unknown variable 'indexz'", in ATF_TEST_CASE_BODY()
295 text::templates_def templates; in ATF_TEST_CASE_BODY()
299 ATF_REQUIRE_THROW_RE(text::syntax_error, "Index 'index' out of range " in ATF_TEST_CASE_BODY()
307 text::templates_def templates; in ATF_TEST_CASE_BODY()
320 text::templates_def templates; in ATF_TEST_CASE_BODY()
335 text::templates_def templates; in ATF_TEST_CASE_BODY()
337 ATF_REQUIRE_THROW_RE(text::syntax_error, "Unknown vector 'foo'", in ATF_TEST_CASE_BODY()
345 text::templates_def templates; in ATF_TEST_CASE_BODY()
346 ATF_REQUIRE_THROW_RE(text::syntax_error, in ATF_TEST_CASE_BODY()
349 ATF_REQUIRE_THROW_RE(text::syntax_error, in ATF_TEST_CASE_BODY()
358 const text::templates_def templates; in ATF_TEST_CASE_BODY()
380 text::templates_def templates; in ATF_TEST_CASE_BODY()
396 text::templates_def templates; in ATF_TEST_CASE_BODY()
414 text::templates_def templates; in ATF_TEST_CASE_BODY()
434 text::templates_def templates; in ATF_TEST_CASE_BODY()
458 text::templates_def templates; in ATF_TEST_CASE_BODY()
479 text::templates_def templates; in ATF_TEST_CASE_BODY()
492 text::templates_def templates; in ATF_TEST_CASE_BODY()
506 text::templates_def templates; in ATF_TEST_CASE_BODY()
537 text::templates_def templates; in ATF_TEST_CASE_BODY()
565 text::templates_def templates; in ATF_TEST_CASE_BODY()
604 text::templates_def templates; in ATF_TEST_CASE_BODY()
645 text::templates_def templates; in ATF_TEST_CASE_BODY()
670 text::templates_def templates; in ATF_TEST_CASE_BODY()
694 text::templates_def templates; in ATF_TEST_CASE_BODY()
732 text::templates_def templates; in ATF_TEST_CASE_BODY()
766 text::templates_def templates; in ATF_TEST_CASE_BODY()
813 text::templates_def templates; in ATF_TEST_CASE_BODY()
851 text::templates_def templates; in ATF_TEST_CASE_BODY()
873 text::templates_def templates; in ATF_TEST_CASE_BODY()
883 do_test_fail(text::templates_def(), "%\n", "Empty statement"); in ATF_TEST_CASE_BODY()
890 do_test_fail(text::templates_def(), "%if2\n", "Unknown statement 'if2'"); in ATF_TEST_CASE_BODY()
897 do_test_fail(text::templates_def(), "%if a b\n", in ATF_TEST_CASE_BODY()
905 text::templates_def templates; in ATF_TEST_CASE_BODY()
910 text::instantiate(templates, fs::path("input.txt"), fs::path("output.txt")); in ATF_TEST_CASE_BODY()
923 text::templates_def templates; in ATF_TEST_CASE_BODY()
924 ATF_REQUIRE_THROW_RE(text::error, "Failed to open input.txt for read", in ATF_TEST_CASE_BODY()
925 text::instantiate(templates, fs::path("input.txt"), in ATF_TEST_CASE_BODY()
937 text::templates_def templates; in ATF_TEST_CASE_BODY()
943 ATF_REQUIRE_THROW_RE(text::error, "Failed to open dir/output.txt for write", in ATF_TEST_CASE_BODY()
944 text::instantiate(templates, fs::path("input.txt"), in ATF_TEST_CASE_BODY()