Run codegen commands as tests if their results are commited

This commit is contained in:
Lukas Wirth 2024-07-07 09:14:50 +02:00
parent 866102cdaf
commit ce5046be50
7 changed files with 23 additions and 3 deletions

View file

@ -1,4 +1,4 @@
//! Generated by `sourcegen_ast`, do not edit by hand.
//! Generated by `cargo codegen grammar`, do not edit by hand.
#![allow(bad_style, missing_docs, unreachable_pub)]
#[doc = r" The kind of syntax node, e.g. `IDENT`, `USE_KW`, or `STRUCT`."]

View file

@ -1,4 +1,4 @@
//! Generated by `sourcegen_ast`, do not edit by hand.
//! Generated by `cargo codegen grammar`, do not edit by hand.
#![allow(non_snake_case)]
use crate::{

View file

@ -1,4 +1,4 @@
//! Generated by `sourcegen_ast`, do not edit by hand.
//! Generated by `cargo codegen grammar`, do not edit by hand.
use crate::{
ast::AstToken,

View file

@ -195,3 +195,8 @@ fn reveal_hash_comments(text: &str) -> String {
})
.fold(String::new(), |mut acc, it| format_to_acc!(acc, "{it}\n"))
}
#[test]
fn test() {
generate(true);
}

View file

@ -890,3 +890,8 @@ impl AstNodeSrc {
});
}
}
#[test]
fn test() {
generate(true);
}

View file

@ -127,3 +127,8 @@ fn existing_tests(dir: &Path, ok: bool) -> HashMap<String, (PathBuf, Test)> {
}
res
}
#[test]
fn test() {
generate(true);
}

View file

@ -338,3 +338,8 @@ fn find_marks(set: &mut HashSet<String>, text: &str, mark: &str) {
}
}
}
#[test]
fn test() {
Tidy {}.run(&Shell::new().unwrap()).unwrap();
}