Skip to content
Snippets Groups Projects
Commit e2126455 authored by Jakob Hellermann's avatar Jakob Hellermann Committed by Michael Aaron Murphy
Browse files

tests: add tests for variable expansion with non-alphanumerical characters

parent 522a3f1c
No related branches found
No related tags found
No related merge requests found
...@@ -313,6 +313,22 @@ pub(crate) mod tests { ...@@ -313,6 +313,22 @@ pub(crate) mod tests {
assert_eq!("BAR", &expanded); assert_eq!("BAR", &expanded);
} }
#[test]
fn set_var_with_nonalphanumerical_name() {
let mut variables = Variables::default();
variables.set("FOO!-", "BAR");
let expanded = VariableExpander(variables).expand_string("$FOO!-").unwrap().join("");
assert_eq!("BAR", &expanded);
}
#[test]
fn set_var_with_nonalphanumerical_braces_name() {
let mut variables = Variables::default();
variables.set("FOO!-", "BAR");
let expanded = VariableExpander(variables).expand_string("${FOO!-}").unwrap().join("");
assert_eq!("BAR", &expanded);
}
#[test] #[test]
#[serial] #[serial]
fn minimal_directory_var_should_compact_path() { fn minimal_directory_var_should_compact_path() {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment