changelog: fix test, provide maintainer info
All checks were successful
CI / build (push) Successful in 1m12s
All checks were successful
CI / build (push) Successful in 1m12s
This commit is contained in:
@@ -307,7 +307,15 @@ mod tests {
|
|||||||
commit(repo_dir, "Add feature B");
|
commit(repo_dir, "Add feature B");
|
||||||
|
|
||||||
// Generate entry
|
// Generate entry
|
||||||
|
unsafe {
|
||||||
|
std::env::set_var("DEBFULLNAME", "Maintainer Maintainer");
|
||||||
|
std::env::set_var("DEBEMAIL", "maintainer@maintainer.com");
|
||||||
|
}
|
||||||
generate_entry("debian/changelog", Some(repo_dir), None).unwrap();
|
generate_entry("debian/changelog", Some(repo_dir), None).unwrap();
|
||||||
|
unsafe {
|
||||||
|
std::env::remove_var("DEBFULLNAME");
|
||||||
|
std::env::remove_var("DEBEMAIL");
|
||||||
|
}
|
||||||
|
|
||||||
// Verify content
|
// Verify content
|
||||||
let content = std::fs::read_to_string(&changelog_path).unwrap();
|
let content = std::fs::read_to_string(&changelog_path).unwrap();
|
||||||
@@ -316,6 +324,7 @@ mod tests {
|
|||||||
assert!(content.contains("mypackage (0.1.0-2) unstable; urgency=medium"));
|
assert!(content.contains("mypackage (0.1.0-2) unstable; urgency=medium"));
|
||||||
assert!(content.contains("* Fix bug A"));
|
assert!(content.contains("* Fix bug A"));
|
||||||
assert!(content.contains("* Add feature B"));
|
assert!(content.contains("* Add feature B"));
|
||||||
|
assert!(content.contains(" -- Maintainer Maintainer <maintainer@maintainer.com> "));
|
||||||
// Should still contain old content
|
// Should still contain old content
|
||||||
assert!(content.contains("mypackage (0.1.0-1) unstable; urgency=medium"));
|
assert!(content.contains("mypackage (0.1.0-1) unstable; urgency=medium"));
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user