add explainers for asserts in test cases
@@ -136,8 +136,8 @@ fn author_from_different_config_sections() {
let work_dir = repo.work_dir().unwrap().canonicalize().unwrap();
let _env = Env::new()
- .set("GIT_CONFIG_GLOBAL", work_dir.join("global.config").to_string_lossy())
- .set("GIT_CONFIG_SYSTEM", work_dir.join("system.config").to_string_lossy())
+ .set("GIT_CONFIG_GLOBAL", work_dir.join("global.config").to_str().unwrap())
+ .set("GIT_CONFIG_SYSTEM", work_dir.join("system.config").to_str().unwrap())
.set("GIT_AUTHOR_DATE", "1979-02-26 18:30:00")
.set("GIT_COMMITTER_DATE", "1980-02-26 18:30:00 +0000")
.set("EMAIL", "general@email-unused");
@@ -169,6 +169,8 @@ fn author_from_different_config_sections() {
sign: git_date::time::Sign::Plus
}
}),
+ "author name comes from global config, \
+ but email comes from repository-local config",
);
assert_eq!(
repo.committer(),
@@ -180,7 +182,9 @@ fn author_from_different_config_sections() {
offset_in_seconds: 0,
sign: git_date::time::Sign::Plus,
}
- })
+ }),
+ "committer name comes from repository-local config, \
+ but committer email comes from global config"
);
assert_eq!(
repo.user_default().actor(),
