Skip to content

Commit

Permalink
Merge pull request #40 from VolumeGraphics/improve_json_array_diff
Browse files Browse the repository at this point in the history
Update json-diff library with array support.
  • Loading branch information
ChrisRega committed Oct 10, 2023
2 parents bdb42e0 + 0937751 commit 7c0f3df
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ description = "A flexible rule-based file and folder comparison tool and crate i
repository = "https://github.com/VolumeGraphics/havocompare"
homepage = "https://github.com/VolumeGraphics/havocompare"
documentation = "https://docs.rs/havocompare"
version = "0.5.0-RC1"
version = "0.5.0-RC2"
edition = "2021"
license = "MIT"
authors = ["Volume Graphics GmbH"]
Expand Down Expand Up @@ -47,7 +47,7 @@ tempfile = "3.8"
fs_extra = "1.3"
opener = "0.6"
anyhow = "1.0"
json_diff_ng = {version = "0.2"}
json_diff_ng = {version = "0.3.0-rc1"}


[dev-dependencies]
Expand Down
10 changes: 5 additions & 5 deletions src/json.rs
Original file line number Diff line number Diff line change
Expand Up @@ -128,9 +128,9 @@ mod test {
} = result.detail.first().unwrap()
{
let differences = trim_split(differences);
assert!(differences.contains(&"car -> [ \"RX7\" :: \"Panda Trueno\" ]"));
assert!(differences.contains(&"age -> [ 21 :: 18 ]"));
assert!(differences.contains(&"name -> [ \"Keisuke\" :: \"Takumi\" ]"));
assert!(differences.contains(&"car -> { \"RX7\" != \"Panda Trueno\" }"));
assert!(differences.contains(&"age -> { 21 != 18 }"));
assert!(differences.contains(&"name -> { \"Keisuke\" != \"Takumi\" }"));
assert_eq!(differences.len(), 3);

assert_eq!(left.as_str(), " brothers");
Expand Down Expand Up @@ -160,8 +160,8 @@ mod test {
} = result.detail.first().unwrap()
{
let differences = trim_split(differences);
assert!(differences.contains(&"car -> [ \"RX7\" :: \"Panda Trueno\" ]"));
assert!(differences.contains(&"age -> [ 21 :: 18 ]"));
assert!(differences.contains(&"car -> { \"RX7\" != \"Panda Trueno\" }"));
assert!(differences.contains(&"age -> { 21 != 18 }"));
assert_eq!(differences.len(), 2);
assert!(right.is_empty());
assert!(left.is_empty());
Expand Down

0 comments on commit 7c0f3df

Please sign in to comment.