diff options
Diffstat (limited to 'crates/tools/tests')
-rw-r--r-- | crates/tools/tests/cli.rs | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/crates/tools/tests/cli.rs b/crates/tools/tests/cli.rs new file mode 100644 index 000000000..f507d80a2 --- /dev/null +++ b/crates/tools/tests/cli.rs | |||
@@ -0,0 +1,13 @@ | |||
1 | extern crate tools; | ||
2 | |||
3 | use tools::{AST, AST_TEMPLATE, SYNTAX_KINDS, SYNTAX_KINDS_TEMPLATE, render_template, update, project_root}; | ||
4 | |||
5 | #[test] | ||
6 | fn verify_template_generation() { | ||
7 | if let Err(error) = update(&project_root().join(SYNTAX_KINDS), &render_template(&project_root().join(SYNTAX_KINDS_TEMPLATE)).unwrap(), true) { | ||
8 | panic!("{}. Please update it by running `cargo gen-kinds`", error); | ||
9 | } | ||
10 | if let Err(error) = update(&project_root().join(AST), &render_template(&project_root().join(AST_TEMPLATE)).unwrap(), true) { | ||
11 | panic!("{}. Please update it by running `cargo gen-kinds`", error); | ||
12 | } | ||
13 | } | ||