mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Added "-help" option to Options.td Added also: * Added "OPT_HELP" case in the main TestOptions.cpp switch. It uses the llvm options help functionality to provide up-to-date help * Additional "Use -help for assistance" at the end of the error message that appears when calling an unknown option Added their following tests, respectively:: * usage.swift, and * wrong_arguments.swift Extra: FIXME: in TestOptions::printHelp, suggesting a possible expansion for the printHelp option (details in file)
8 lines
248 B
Swift
8 lines
248 B
Swift
// Check that from invalid input, program suggests using -help
|
|
|
|
// RUN: not %sourcekitd-test -this_option_does_not_exist 2>&1 | %FileCheck %s
|
|
|
|
// CHECK: error: unknown argument: -this_option_does_not_exist
|
|
// CHECK: Use -h or -help for assistance
|
|
|