2 unstable releases

0.2.0 Feb 12, 2020
0.1.0 Dec 17, 2019

#1164 in Filesystem

Download history 462/week @ 2023-11-26 463/week @ 2023-12-03 463/week @ 2023-12-10 252/week @ 2023-12-17 170/week @ 2023-12-24 315/week @ 2023-12-31 370/week @ 2024-01-07 435/week @ 2024-01-14 247/week @ 2024-01-21 194/week @ 2024-01-28 214/week @ 2024-02-04 177/week @ 2024-02-11 412/week @ 2024-02-18 409/week @ 2024-02-25 532/week @ 2024-03-03 362/week @ 2024-03-10

1,735 downloads per month
Used in 2 crates

MIT license

15KB
277 lines

Build Status

dir-assert

Compare contents of two directories.

This crate provides macro and function for asserting whether two directories or files are equal.

Example usage:

#[test]
fn test_macro() {
    assert_paths!("actual", "expected");
}

#[test]
fn test_fn() {
    assert_paths("actual", "expected").unwrap();
}

These functions will panic yielding detailed information about which paths didn't match during comparison. Moreover, line at which each file differs, when other with same name is found also will be reported.

To do before 1.0:

  • assert should println! or debug! all paths it went through
  • we need to follow symlinks
  • we need to add optional configuration to:
    • know if follow symlinks or just compare their names
    • compare actual with stringified dir (no expected folder, only &str as input)
    • provide file comparison function (we may use hashing comparers or just check file metadata)
  • unit test error new_* functions
  • change acceptance tests to compare Debug instead of Display
  • hide Debug and Clone implementations behind feature

License: MIT

No runtime deps