Skip to content

Commit 0aef1a9

Browse files
committed
Added failing test for quoted values containing periods
1 parent 94312ff commit 0aef1a9

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

Utility.CommandLine.Arguments.Tests/Arguments.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -324,6 +324,19 @@ public void ParseStringOfLongs()
324324
Assert.Equal("5 5", test["five"]);
325325
}
326326

327+
/// <summary>
328+
/// Tests the <see cref="Utility.CommandLine.Arguments.Parse(string)"/> method with an explicit command line string
329+
/// containing arguments with values enclosed in quotes and containing a period.
330+
/// </summary>
331+
[Fact]
332+
public void ParseValueWithQuotedPeriod()
333+
{
334+
Dictionary<string, string> test = CommandLine.Arguments.Parse("--test \"test.test\" --test2 'test2.test2.'").ArgumentDictionary;
335+
336+
Assert.Equal("test.test", test["test"]);
337+
Assert.Equal("test2.test2", test["test2"]);
338+
}
339+
327340
/// <summary>
328341
/// Tests the <see cref="Utility.CommandLine.Arguments.Populate(string)"/> method with the default values.
329342
/// </summary>

0 commit comments

Comments
 (0)