| 13 | } |
| 14 | |
| 15 | TEST(LuaGrammar, basic) { |
| 16 | std::vector<std::string> paths; |
| 17 | std::filesystem::path root(TestHelper::ScriptBase); |
| 18 | std::filesystem::path dir = root / "grammar"; |
| 19 | TestHelper::CollectLuaFile(dir, paths, root); |
| 20 | for (auto &filePath: paths) { |
| 21 | auto text = TestHelper::ReadFile(filePath); |
| 22 | auto p = TestHelper::GetParser(text); |
| 23 | |
| 24 | EXPECT_FALSE(p.HasError()) |
| 25 | << util::format("error at {}\n", filePath) |
| 26 | << MakeErrors(p); |
| 27 | } |
| 28 | } |
| 29 | |
| 30 | TEST(LuaGrammar, extend) { |
| 31 | EXPECT_FALSE(TestHelper::GetParser("local t = `123`", true).HasError()) << "extend grammar Interpolate strings test fail"; |
no test coverage detected