aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/tests
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tools/tests')
-rw-r--r--crates/tools/tests/cli.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/tools/tests/cli.rs b/crates/tools/tests/cli.rs
new file mode 100644
index 000000000..26d9a991c
--- /dev/null
+++ b/crates/tools/tests/cli.rs
@@ -0,0 +1,16 @@
1extern crate tools;
2
3use std::path::Path;
4use tools::{render_template, update};
5
6const GRAMMAR: &str = "../ra_syntax/src/grammar.ron";
7const SYNTAX_KINDS: &str = "../ra_syntax/src/syntax_kinds/generated.rs";
8const SYNTAX_KINDS_TEMPLATE: &str = "../ra_syntax/src/syntax_kinds/generated.rs.tera";
9const AST: &str = "../ra_syntax/src/ast/generated.rs";
10const AST_TEMPLATE: &str = "../ra_syntax/src/ast/generated.rs.tera";
11
12#[test]
13fn verify_template_generation() {
14 update(Path::new(SYNTAX_KINDS), &render_template(SYNTAX_KINDS_TEMPLATE, GRAMMAR).unwrap(), true).unwrap();
15 update(Path::new(AST), &render_template(AST_TEMPLATE, GRAMMAR).unwrap(), true).unwrap();
16} \ No newline at end of file