tsk-22: Add function to parse env variable to a vector of strings (#25)

Closes #22

Reviewed-on: #25
Co-authored-by: phoenix <kundeng00@pm.me>
Co-committed-by: phoenix <kundeng00@pm.me>
This commit is contained in:
phoenix
2025-10-10 19:14:15 +00:00
committed by phoenix
parent 38e0073cbe
commit 8f0d123db5
6 changed files with 67 additions and 5 deletions
+22 -1
View File
@@ -114,7 +114,28 @@ mod tests {
"{} does not match {:?}",
icarus_envy::keys::ALLOWED_ORIGINS,
result
)
);
assert_eq!(
result.has_delimiter, true,
"The {} variable has an issue finding the delimiter",
result.key
);
match icarus_envy::utility::delimitize(&result) {
Ok(allowed_origins) => {
assert_eq!(
allowed_origins.len(),
2,
"The amount of allowed origins does not match. {} {}",
allowed_origins.len(),
2
)
}
Err(err) => {
assert!(false, "Error: {:?}", err)
}
}
}
#[test]