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