-
Notifications
You must be signed in to change notification settings - Fork 588
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1472 from CaringDev/GitRename
Git: recognize renamed (and other status) files
- Loading branch information
Showing
3 changed files
with
39 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
using Machine.Specifications; | ||
using static Fake.Git.FileStatus; | ||
|
||
namespace Test.Git | ||
{ | ||
public class when_getting_file_status | ||
{ | ||
It should_be_able_to_get_modified_files = | ||
() => FileStatus | ||
.Parse.Invoke("M") | ||
.ShouldEqual(FileStatus.Modified); | ||
|
||
It should_be_able_to_get_rewritten_files = | ||
() => FileStatus | ||
.Parse.Invoke("M42") | ||
.ShouldEqual(FileStatus.Modified); | ||
|
||
It should_be_able_to_get_renamed_files = | ||
() => FileStatus | ||
.Parse.Invoke("R100") | ||
.ShouldEqual(FileStatus.Renamed); | ||
|
||
It should_be_able_to_get_probably_renamed_files = | ||
() => FileStatus | ||
.Parse.Invoke("R75") | ||
.ShouldEqual(FileStatus.Renamed); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters