#[test]
fn test_expansions()
{
crate::utils::ExpansionTester::run_default_test_setup("tests/no_features", "testing");
}
#[rustversion::since(1.56)]
#[test]
fn test_edition_2021()
{
let output = std::process::Command::new("cargo")
.arg("build")
.current_dir("tests/no_features/edition_2021")
.output()
.unwrap();
assert!(
output.status.success(),
"Failed to build edition 2021: {:?}",
output
);
}
#[test]
fn ensure_no_group_new()
{
let re = regex::Regex::new(r"[[:^alpha:]]Group(\s)*::(\s)*new").unwrap();
for path in std::fs::read_dir("src").unwrap()
{
let path = path.unwrap().path();
let file_content = std::fs::read_to_string(&path).unwrap();
assert!(
!re.is_match(file_content.as_str()),
"Found 'Group::new' in {:?}",
path
);
}
}