forked from gitextensions/gitextensions
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
* Fix gitextensions#3501 * Add unit tests for fix gitextensions#3501
- Loading branch information
1 parent
ec750e0
commit e6cf41f
Showing
3 changed files
with
29 additions
and
0 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
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,25 @@ | ||
using GitCommands; | ||
using NUnit.Framework; | ||
|
||
namespace GitCommandsTests | ||
{ | ||
[TestFixture] | ||
public class GitModuleTest | ||
{ | ||
GitModule _gitModule; | ||
[SetUp] | ||
public void SetUp() | ||
{ | ||
_gitModule = new GitModule(null); | ||
} | ||
|
||
[TestCase(@" ""author <author@mail.com>"" ", @"commit --author=""author <author@mail.com>"" -F ""COMMITMESSAGE""")] | ||
[TestCase(@"""author <author@mail.com>""", @"commit --author=""author <author@mail.com>"" -F ""COMMITMESSAGE""")] | ||
[TestCase(@"author <author@mail.com>", @"commit --author=""author <author@mail.com>"" -F ""COMMITMESSAGE""")] | ||
public void CommitCmdShouldTrimAuthor(string input, string expected) | ||
{ | ||
var actual = _gitModule.CommitCmd(false, author: input); | ||
StringAssert.AreEqualIgnoringCase(expected, actual); | ||
} | ||
} | ||
} |