better test formatting
This commit is contained in:
parent
60fe0deb91
commit
559afb01fa
1 changed files with 43 additions and 37 deletions
18
src/file.rs
18
src/file.rs
|
@ -1325,7 +1325,8 @@ mod display {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn can_reconstruct_non_empty_config() {
|
fn can_reconstruct_non_empty_config() {
|
||||||
let config = r#"[user]
|
let config = r#"
|
||||||
|
[user]
|
||||||
email = code@eddie.sh
|
email = code@eddie.sh
|
||||||
[core]
|
[core]
|
||||||
autocrlf = input
|
autocrlf = input
|
||||||
|
@ -1342,14 +1343,16 @@ mod display {
|
||||||
[pull]
|
[pull]
|
||||||
ff = only
|
ff = only
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = master"#;
|
defaultBranch = master
|
||||||
|
"#;
|
||||||
|
|
||||||
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
|
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn can_reconstruct_configs_with_implicits() {
|
fn can_reconstruct_configs_with_implicits() {
|
||||||
let config = r#"[user]
|
let config = r#"
|
||||||
|
[user]
|
||||||
email
|
email
|
||||||
name
|
name
|
||||||
[core]
|
[core]
|
||||||
|
@ -1357,14 +1360,16 @@ mod display {
|
||||||
[push]
|
[push]
|
||||||
default
|
default
|
||||||
[commit]
|
[commit]
|
||||||
gpgsign"#;
|
gpgsign
|
||||||
|
"#;
|
||||||
|
|
||||||
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
|
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
|
||||||
}
|
}
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn can_reconstruct_configs_without_whitespace_in_middle() {
|
fn can_reconstruct_configs_without_whitespace_in_middle() {
|
||||||
let config = r#"[core]
|
let config = r#"
|
||||||
|
[core]
|
||||||
autocrlf=input
|
autocrlf=input
|
||||||
[push]
|
[push]
|
||||||
default=simple
|
default=simple
|
||||||
|
@ -1373,7 +1378,8 @@ mod display {
|
||||||
[pull]
|
[pull]
|
||||||
ff = only
|
ff = only
|
||||||
[init]
|
[init]
|
||||||
defaultBranch = master"#;
|
defaultBranch = master
|
||||||
|
"#;
|
||||||
|
|
||||||
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
|
assert_eq!(GitConfig::try_from(config).unwrap().to_string(), config);
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue