File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
Sources/SwiftDocCUtilities/ArgumentParsing/Subcommands
Tests/SwiftDocCUtilitiesTests/ArgumentParsing Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -340,6 +340,13 @@ extension Docc {
340
340
""" )
341
341
)
342
342
var fallbackDefaultModuleKind : String ?
343
+
344
+ @Option (
345
+ name: [ . customLong( " fallback-bundle-version " ) , . customLong( " bundle-version " ) ] ,
346
+ help: . hidden
347
+ )
348
+ @available ( * , deprecated, message: " The bundle version isn't used for anything. " )
349
+ var _unusedVersionForBackwardsCompatibility : String ?
343
350
344
351
func validate( ) throws {
345
352
for deprecatedOptionName in [ " display-name " , " bundle-identifier " , " bundle-version " ] {
Original file line number Diff line number Diff line change @@ -580,4 +580,15 @@ class ConvertSubcommandTests: XCTestCase {
580
580
let disabledFlagConvert = try Docc . Convert. parse ( [ " --disable-parameters-and-returns-validation " ] )
581
581
XCTAssertEqual ( disabledFlagConvert. enableParametersAndReturnsValidation, false )
582
582
}
583
+
584
+ // This test calls ``ConvertOptions.infoPlistFallbacks._unusedVersionForBackwardsCompatibility`` which is deprecated.
585
+ // Deprecating the test silences the deprecation warning when running the tests. It doesn't skip the test.
586
+ @available ( * , deprecated)
587
+ func testVersionFlag( ) throws {
588
+ let noFlagConvert = try Docc . Convert. parse ( [ ] )
589
+ XCTAssertEqual ( noFlagConvert. infoPlistFallbacks. _unusedVersionForBackwardsCompatibility, nil )
590
+
591
+ let enabledFlagConvert = try Docc . Convert. parse ( [ " --fallback-bundle-version " , " 1.2.3 " ] )
592
+ XCTAssertEqual ( enabledFlagConvert. infoPlistFallbacks. _unusedVersionForBackwardsCompatibility, " 1.2.3 " )
593
+ }
583
594
}
You can’t perform that action at this time.
0 commit comments