This commit is contained in:
@@ -358,14 +358,18 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_get_maintainer_info() {
|
fn test_get_maintainer_info() {
|
||||||
// Test with env vars
|
// Test with env vars
|
||||||
std::env::set_var("DEBFULLNAME", "Env Name");
|
unsafe {
|
||||||
std::env::set_var("DEBEMAIL", "env@example.com");
|
std::env::set_var("DEBFULLNAME", "Env Name");
|
||||||
|
std::env::set_var("DEBEMAIL", "env@example.com");
|
||||||
|
}
|
||||||
|
|
||||||
let (name, email) = get_maintainer_info().unwrap();
|
let (name, email) = get_maintainer_info().unwrap();
|
||||||
assert_eq!(name, "Env Name");
|
assert_eq!(name, "Env Name");
|
||||||
assert_eq!(email, "env@example.com");
|
assert_eq!(email, "env@example.com");
|
||||||
|
|
||||||
std::env::remove_var("DEBFULLNAME");
|
unsafe {
|
||||||
std::env::remove_var("DEBEMAIL");
|
std::env::remove_var("DEBFULLNAME");
|
||||||
|
std::env::remove_var("DEBEMAIL");
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user