Skip to content

Commit c36832e

Browse files
Test failure of archive and dump commands with invalid input file
1 parent b161bf3 commit c36832e

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

UnityDataTool.Tests/UnityDataToolTests.cs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,19 @@ public void Teardown()
4343
}
4444
}
4545

46+
[Test]
47+
public async Task InvalidFile(
48+
[Values(
49+
new string[] {"archive", "extract"},
50+
new string[] {"archive", "list"},
51+
new string[] {"dump"}
52+
)] string[] args)
53+
{
54+
var path = Path.Combine(Context.TestDataFolder, "invalidfile");
55+
var command = args.Append(path);
56+
Assert.AreNotEqual(0, await Program.Main(command.ToArray()));
57+
}
58+
4659
[Test]
4760
public async Task ArchiveExtract_FilesExtractedSuccessfully(
4861
[Values("", "-o archive", "--output-path archive")] string options)

0 commit comments

Comments
 (0)