Skip to content

Commit cf4fb86

Browse files
committed
Refactored ArgumentParser for improved Unix path handling.
1 parent 460fe24 commit cf4fb86

File tree

4 files changed

+195
-145
lines changed

4 files changed

+195
-145
lines changed

src/GitVersionExe.Tests/ArgumentParserTests.cs

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -165,11 +165,12 @@ public void Wrong_number_of_arguments_should_throw()
165165
exception.Message.ShouldBe("Could not parse command line parameter 'extraArg'.");
166166
}
167167

168-
[Test]
169-
public void Unknown_argument_should_throw()
168+
[TestCase("targetDirectoryPath -x logFilePath")]
169+
[TestCase("/invalid-argument")]
170+
public void Unknown_arguments_should_throw(string arguments)
170171
{
171-
var exception = Assert.Throws<WarningException>(() => ArgumentParser.ParseArguments("targetDirectoryPath -x logFilePath"));
172-
exception.Message.ShouldBe("Could not parse command line parameter '-x'.");
172+
var exception = Assert.Throws<WarningException>(() => ArgumentParser.ParseArguments(arguments));
173+
exception.Message.ShouldStartWith("Could not parse command line parameter");
173174
}
174175

175176
[TestCase("-updateAssemblyInfo true")]

0 commit comments

Comments
 (0)