Skip to content

Commit a28817f

Browse files
authored
Add a simple test for any self-update subcommand parse errors (#418)
1 parent 25315f0 commit a28817f

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import ArgumentParser
2+
@testable import Swiftly
3+
import Testing
4+
5+
// Test for simple mistakes declaring options and arguments in subcommands
6+
// that only show up at runtime. For example, a non-optional type for an
7+
// @Option will produce an error "Replace with a static variable, or let constant."
8+
@Suite struct SubcommandParsingTests {
9+
@Test func selfUpdateParse() throws {
10+
try SelfUpdate.parse([])
11+
}
12+
}

0 commit comments

Comments
 (0)