Skip to content

Commit

Permalink
- List tests added
Browse files Browse the repository at this point in the history
  • Loading branch information
sLill committed Sep 5, 2023
1 parent d46d5e8 commit 62ab9f3
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 13 deletions.
27 changes: 15 additions & 12 deletions WindowsGrep/WindowsGrep.Test/NativeCommands/List/ListTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,18 +32,21 @@ public void Setup()
#endregion Setup

#region Tests..
//#region List_Multi
//[Test]
//public async Task List_Multi()
//{
// string command = $"cd {TestDataDirectory} | {_flagDescriptor}";

// var commandResultCollection = new CommandResultCollection();
// await WindowsGrep.RunCommandAsync(command, commandResultCollection, new CancellationToken());

// Assert.IsTrue(commandResultCollection.Count == 1);
//}
//#endregion List_Multi
#region List_Empty
[Test]
public async Task List_Empty()
{
string emptyDirectory = Path.Combine(TestDataDirectory, "Empty");
Directory.CreateDirectory(emptyDirectory);

string command = $"cd {emptyDirectory} | {_flagDescriptor}";

var commandResultCollection = new CommandResultCollection();
await WindowsGrep.RunCommandAsync(command, commandResultCollection, new CancellationToken());

Assert.IsTrue(!commandResultCollection.Any());
}
#endregion List_Empty
#endregion Tests..
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The quick brown fox jumps over the lazy dog
1 change: 0 additions & 1 deletion WindowsGrep/WindowsGrep.Test/WindowsGrep.Test.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,6 @@
<Folder Include="Flags\PathExcludeFilter\TestData\" />
<Folder Include="Flags\PathFilter\TestData\" />
<Folder Include="Flags\Replace\TestData\" />
<Folder Include="NativeCommands\List\TestData\" />
</ItemGroup>

<ItemGroup>
Expand Down

0 comments on commit 62ab9f3

Please sign in to comment.