lazy_static! {
static ref MOD_TEXT_PREFIXES: Vec<&'static str> = include_str!("mod-text-prefixes.txt")
.split("\n")
.filter(|line| !line.is_empty() && !line.trim_left().starts_with("//"))
.collect();
}
#[test]
fn prefixes_of_prefixes_are_correctly_ordered() {
let count = MOD_TEXT_PREFIXES.len();
for i in 0..count {
for j in (i + 1)..count {
let earlier = MOD_TEXT_PREFIXES[i];
let later = MOD_TEXT_PREFIXES[j];
assert!(!later.starts_with(earlier),
"Prefix `{}` starts with `{}` which comes earlier in the list!",
later, earlier);
}
}
}