Skip to content

Commit

Permalink
a little more complexity for diff tests (#470)
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron committed Sep 19, 2022
1 parent 28c4cae commit 5878ad1
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 5 deletions.
Git LFS file not shown
3 changes: 2 additions & 1 deletion git-repository/tests/fixtures/make_diff_repo.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,14 @@ git init -q

git checkout -b main
mkdir dir
touch a b dir/c
touch a b dir/c d
git add .
git commit -q -m c1

echo a >> a
echo b >> b
echo dir/c >> dir/c
echo d >> d
git commit -q -am c2

echo a1 >> a
Expand Down
4 changes: 2 additions & 2 deletions git-repository/tests/object/tree.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ mod diff {
);
let to = tree_named(&repo, ":/c1");

let mut expected = vec!["a", "b", "c"];
let mut expected = vec!["a", "b", "c", "d"];
from.changes()
.track_filename()
.for_each_to_obtain_tree(&to, |change| -> Result<_, Infallible> {
Expand All @@ -62,7 +62,7 @@ mod diff {
.unwrap();
assert_eq!(expected, Vec::<&str>::new(), "all paths should have been seen");

let mut expected = vec!["a", "b", "dir/c"];
let mut expected = vec!["a", "b", "dir/c", "d"];
from.changes()
.track_path()
.for_each_to_obtain_tree(&to, |change| -> Result<_, Infallible> {
Expand Down

0 comments on commit 5878ad1

Please sign in to comment.