diff options
| author | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-07-17 13:01:54 +0000 |
|---|---|---|
| committer | 许杰友 Jieyou Xu (Joe) <jieyouxu@outlook.com> | 2024-07-17 13:32:29 +0000 |
| commit | 30bdc4a30994beb338f9ab6589fd992082b3f0af (patch) | |
| tree | 94d0aab7c9ed1f06ab12153ca858263117fbfa35 | |
| parent | 57a2f76557c3b4ea4ad0c40f1c9dc9c11ca9d289 (diff) | |
| download | rust-30bdc4a30994beb338f9ab6589fd992082b3f0af.tar.gz rust-30bdc4a30994beb338f9ab6589fd992082b3f0af.zip | |
run_make_support: rename `assert_recursive_eq` to `assert_dirs_are_equal`
| -rw-r--r-- | src/tools/run-make-support/src/assertion_helpers.rs | 4 | ||||
| -rw-r--r-- | src/tools/run-make-support/src/lib.rs | 2 |
2 files changed, 3 insertions, 3 deletions
diff --git a/src/tools/run-make-support/src/assertion_helpers.rs b/src/tools/run-make-support/src/assertion_helpers.rs index 844c2d477aa..07992afc4b9 100644 --- a/src/tools/run-make-support/src/assertion_helpers.rs +++ b/src/tools/run-make-support/src/assertion_helpers.rs @@ -48,12 +48,12 @@ pub fn assert_not_contains<H: AsRef<str>, N: AsRef<str>>(haystack: H, needle: N) } /// Assert that all files in `dir1` exist and have the same content in `dir2` -pub fn assert_recursive_eq(dir1: impl AsRef<Path>, dir2: impl AsRef<Path>) { +pub fn assert_dirs_are_equal(dir1: impl AsRef<Path>, dir2: impl AsRef<Path>) { let dir2 = dir2.as_ref(); rfs::read_dir_entries(dir1, |entry_path| { let entry_name = entry_path.file_name().unwrap(); if entry_path.is_dir() { - assert_recursive_eq(&entry_path, &dir2.join(entry_name)); + assert_dirs_are_equal(&entry_path, &dir2.join(entry_name)); } else { let path2 = dir2.join(entry_name); let file1 = rfs::read(&entry_path); diff --git a/src/tools/run-make-support/src/lib.rs b/src/tools/run-make-support/src/lib.rs index 3dbc2d201ff..1a5e6d092ec 100644 --- a/src/tools/run-make-support/src/lib.rs +++ b/src/tools/run-make-support/src/lib.rs @@ -71,7 +71,7 @@ pub use path_helpers::{ pub use scoped_run::{run_in_tmpdir, test_while_readonly}; pub use assertion_helpers::{ - assert_contains, assert_equals, assert_not_contains, assert_recursive_eq, + assert_contains, assert_dirs_are_equal, assert_equals, assert_not_contains, }; pub use string::{ |
