File tree Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Expand file tree Collapse file tree 1 file changed +23
-0
lines changed Original file line number Diff line number Diff line change @@ -61,6 +61,29 @@ public void CanCompareASimpleTreeAgainstTheWorkDir()
61
61
}
62
62
}
63
63
64
+ [ Fact ]
65
+ public void CanCompareAMoreComplexTreeAgainstTheWorkdir ( )
66
+ {
67
+ using ( var repo = new Repository ( StandardTestRepoPath ) )
68
+ {
69
+ Tree tree = repo . Head . Tip . Tree ;
70
+
71
+ TreeChanges changes = repo . Diff . Compare ( tree , DiffTarget . WorkingDirectory ) ;
72
+ Assert . NotNull ( changes ) ;
73
+
74
+ Assert . Equal ( 6 , changes . Count ( ) ) ;
75
+
76
+ Assert . Equal ( new [ ] { "deleted_staged_file.txt" , "deleted_unstaged_file.txt" } ,
77
+ changes . Deleted . Select ( tec => tec . Path ) ) ;
78
+
79
+ Assert . Equal ( new [ ] { "new_tracked_file.txt" , "new_untracked_file.txt" } ,
80
+ changes . Added . Select ( tec => tec . Path ) ) ;
81
+
82
+ Assert . Equal ( new [ ] { "modified_staged_file.txt" , "modified_unstaged_file.txt" } ,
83
+ changes . Modified . Select ( tec => tec . Path ) ) ;
84
+ }
85
+ }
86
+
64
87
[ Fact ]
65
88
/*
66
89
* $ git diff HEAD
You can’t perform that action at this time.
0 commit comments