better test formatting

This commit is contained in:
Edward Shen 2021-03-02 11:28:16 -05:00
parent 60fe0deb91
commit 559afb01fa
Signed by: edward
GPG key ID: 19182661E818369F

View file

@ -1325,7 +1325,8 @@ mod display {
#[test]
fn can_reconstruct_non_empty_config() {
let config = r#"[user]
let config = r#"
[user]
email = code@eddie.sh
[core]
autocrlf = input
@ -1342,14 +1343,16 @@ mod display {
[pull]
ff = only
[init]
defaultBranch = master"#;
defaultBranch = master
"#;
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
}
#[test]
fn can_reconstruct_configs_with_implicits() {
let config = r#"[user]
let config = r#"
[user]
email
name
[core]
@ -1357,14 +1360,16 @@ mod display {
[push]
default
[commit]
gpgsign"#;
gpgsign
"#;
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
}
#[test]
fn can_reconstruct_configs_without_whitespace_in_middle() {
let config = r#"[core]
let config = r#"
[core]
autocrlf=input
[push]
default=simple
@ -1373,7 +1378,8 @@ mod display {
[pull]
ff = only
[init]
defaultBranch = master"#;
defaultBranch = master
"#;
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
}