Skip to content

Commit f24f1ba

Browse files
committed
fix tests to reflect forward slash removal
1 parent 9bb9d30 commit f24f1ba

File tree

1 file changed

+16
-8
lines changed

1 file changed

+16
-8
lines changed

tests/Utility.CommandLine.Arguments.Tests/ArgumentsTests.cs

Lines changed: 16 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public void ParseInnerQuotedStrings()
197197
[Fact]
198198
public void ParseLongAndShortMix()
199199
{
200-
Dictionary<string, object> test = Arguments.Parse("--one=1 -ab 2 /three:3 -4 4").ArgumentDictionary;
200+
Dictionary<string, object> test = Arguments.Parse("--one=1 -ab 2 --three:3 -4 4").ArgumentDictionary;
201201

202202
Assert.Equal("1", test["one"]);
203203
Assert.True(test.ContainsKey("a"));
@@ -355,7 +355,7 @@ public void ParseStrictOperandsStart()
355355
[Fact]
356356
public void ParseStringOfLongs()
357357
{
358-
Dictionary<string, object> test = Arguments.Parse("--one 1 --two=2 /three:3 --four \"4 4\" --five='5 5'").ArgumentDictionary;
358+
Dictionary<string, object> test = Arguments.Parse("--one 1 --two=2 --three:3 --four \"4 4\" --five='5 5'").ArgumentDictionary;
359359

360360
Assert.NotEmpty(test);
361361
Assert.Equal(5, test.Count);
@@ -395,6 +395,15 @@ public void ParseValueWithQuotedPeriod()
395395
[InlineData("\\foo\\bar")]
396396
[InlineData("\\\\foo")]
397397
[InlineData("\\\\foo\\bar")]
398+
[InlineData("..//")]
399+
[InlineData(".//foo")]
400+
[InlineData("..//foo")]
401+
[InlineData("..//..")]
402+
[InlineData("//")]
403+
[InlineData("//foo")]
404+
[InlineData("//foo//bar")]
405+
[InlineData("////foo")]
406+
[InlineData("////foo//bar")]
398407
public void ParseValueStartingWithNonWord(string value)
399408
{
400409
Dictionary<string, object> test = Arguments.Parse($"-f {value}").ArgumentDictionary;
@@ -1100,12 +1109,11 @@ public class TestWithAllBools
11001109
[InlineData("-abc")]
11011110
[InlineData("-a -b -c")]
11021111
[InlineData("--aa --bb --cc")]
1103-
[InlineData("/a /b /c")]
1104-
[InlineData("/aa /bb /cc")]
1105-
[InlineData("-a --bb /c")]
1106-
[InlineData("--aa -b /c")]
1107-
[InlineData("/a /b -c")]
1108-
[InlineData("-a /bb --cc")]
1112+
[InlineData("-a -b -c")]
1113+
[InlineData("--aa --bb --cc")]
1114+
[InlineData("-a --bb -c")]
1115+
[InlineData("--aa -b -c")]
1116+
[InlineData("-a --bb --cc")]
11091117
public void PopulateStackedBools(string str)
11101118
{
11111119
Arguments.Populate(GetType(), str);

0 commit comments

Comments
 (0)