|
@ -50,11 +50,17 @@ mod tests { |
|
|
#[test]
|
|
|
#[test]
|
|
|
fn test_preprocessing_resolve_env_variable() {
|
|
|
fn test_preprocessing_resolve_env_variable() {
|
|
|
assert_eq!(preprocess("key=value".to_string()), Ok(None));
|
|
|
assert_eq!(preprocess("key=value".to_string()), Ok(None));
|
|
|
assert_eq!(preprocess("$key".to_string()), Ok(Some("value".to_string())))
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
|
preprocess("$key".to_string()),
|
|
|
|
|
|
Ok(Some("value".to_string()))
|
|
|
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
#[test]
|
|
|
#[test]
|
|
|
fn test_preprocessing_resolve_non_existent_env_variable() {
|
|
|
fn test_preprocessing_resolve_non_existent_env_variable() {
|
|
|
assert_eq!(preprocess("$nonexitent".to_string()), Ok(Some("".to_string())))
|
|
|
|
|
|
|
|
|
assert_eq!(
|
|
|
|
|
|
preprocess("$nonexitent".to_string()),
|
|
|
|
|
|
Ok(Some("".to_string()))
|
|
|
|
|
|
)
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|