This commit is contained in:
yuni 2024-06-13 00:39:05 +02:00
parent 4ed006c548
commit 0f0d1aa1a9

View file

@ -714,8 +714,14 @@ fn test_normalize_varname() {
assert_eq!(GameVars::normalize_varname("Clippy", "FOO"), "clippy$foo");
assert_eq!(GameVars::normalize_varname("Clippy", "$foo"), "clippy$foo");
assert_eq!(GameVars::normalize_varname("Clippy", "$$foo"), "$$foo");
assert_eq!(GameVars::normalize_varname("Clippy", "PizzaClippy$foo"), "pizzaclippy$foo");
assert_eq!(GameVars::normalize_varname("Clippy", "$foo$foo$foo$foo"), "$foo$foo$foo$foo");
assert_eq!(
GameVars::normalize_varname("Clippy", "PizzaClippy$foo"),
"pizzaclippy$foo"
);
assert_eq!(
GameVars::normalize_varname("Clippy", "$foo$foo$foo$foo"),
"$foo$foo$foo$foo"
);
}
#[derive(Resource, Default)]