2 unstable releases

0.2.0 Feb 12, 2020
0.1.0 Dec 17, 2019

#1457 in Filesystem

Download history 604/week @ 2024-07-29 479/week @ 2024-08-05 584/week @ 2024-08-12 595/week @ 2024-08-19 480/week @ 2024-08-26 268/week @ 2024-09-02 369/week @ 2024-09-09 318/week @ 2024-09-16 391/week @ 2024-09-23 448/week @ 2024-09-30 445/week @ 2024-10-07 658/week @ 2024-10-14 258/week @ 2024-10-21 192/week @ 2024-10-28 251/week @ 2024-11-04 215/week @ 2024-11-11

964 downloads per month
Used in 3 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