From 4275924a0194a8c71ba5849b3569edfa145f28bf Mon Sep 17 00:00:00 2001 From: Chris McGee Date: Tue, 16 Sep 2025 13:25:20 -0400 Subject: [PATCH] Add a simple test for any self-update subcommand parse errors --- Tests/SwiftlyTests/SubcommandParsingTests.swift | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 Tests/SwiftlyTests/SubcommandParsingTests.swift diff --git a/Tests/SwiftlyTests/SubcommandParsingTests.swift b/Tests/SwiftlyTests/SubcommandParsingTests.swift new file mode 100644 index 00000000..adc11112 --- /dev/null +++ b/Tests/SwiftlyTests/SubcommandParsingTests.swift @@ -0,0 +1,12 @@ +import ArgumentParser +@testable import Swiftly +import Testing + +// Test for simple mistakes declaring options and arguments in subcommands +// that only show up at runtime. For example, a non-optional type for an +// @Option will produce an error "Replace with a static variable, or let constant." +@Suite struct SubcommandParsingTests { + @Test func selfUpdateParse() throws { + try SelfUpdate.parse([]) + } +}