aboutsummaryrefslogtreecommitdiff
path: root/crates/tools/tests/cli.rs
diff options
context:
space:
mode:
Diffstat (limited to 'crates/tools/tests/cli.rs')
-rw-r--r--crates/tools/tests/cli.rs7
1 files changed, 3 insertions, 4 deletions
diff --git a/crates/tools/tests/cli.rs b/crates/tools/tests/cli.rs
index 4d5b03b65..9ff1eecd9 100644
--- a/crates/tools/tests/cli.rs
+++ b/crates/tools/tests/cli.rs
@@ -3,7 +3,6 @@ extern crate tools;
3use std::path::Path; 3use std::path::Path;
4use tools::{render_template, update}; 4use tools::{render_template, update};
5 5
6const GRAMMAR: &str = "../ra_syntax/src/grammar.ron";
7const SYNTAX_KINDS: &str = "../ra_syntax/src/syntax_kinds/generated.rs"; 6const SYNTAX_KINDS: &str = "../ra_syntax/src/syntax_kinds/generated.rs";
8const SYNTAX_KINDS_TEMPLATE: &str = "../ra_syntax/src/syntax_kinds/generated.rs.tera"; 7const SYNTAX_KINDS_TEMPLATE: &str = "../ra_syntax/src/syntax_kinds/generated.rs.tera";
9const AST: &str = "../ra_syntax/src/ast/generated.rs"; 8const AST: &str = "../ra_syntax/src/ast/generated.rs";
@@ -11,10 +10,10 @@ const AST_TEMPLATE: &str = "../ra_syntax/src/ast/generated.rs.tera";
11 10
12#[test] 11#[test]
13fn verify_template_generation() { 12fn verify_template_generation() {
14 if let Err(error) = update(Path::new(SYNTAX_KINDS), &render_template(SYNTAX_KINDS_TEMPLATE, GRAMMAR).unwrap(), true) { 13 if let Err(error) = update(Path::new(SYNTAX_KINDS), &render_template(SYNTAX_KINDS_TEMPLATE).unwrap(), true) {
15 panic!("{}. Please update it by running `cargo gen-kinds`", error); 14 panic!("{}. Please update it by running `cargo gen-kinds`", error);
16 } 15 }
17 if let Err(error) = update(Path::new(AST), &render_template(AST_TEMPLATE, GRAMMAR).unwrap(), true) { 16 if let Err(error) = update(Path::new(AST), &render_template(AST_TEMPLATE).unwrap(), true) {
18 panic!("{}. Please update it by running `cargo gen-kinds`", error); 17 panic!("{}. Please update it by running `cargo gen-kinds`", error);
19 } 18 }
20} \ No newline at end of file 19}