-
Notifications
You must be signed in to change notification settings - Fork 436
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Remove bashisms from process_args Signed-off-by: Greg Symons <gsymons@affinipay.com> * Implement missing `add_residual` function Signed-off-by: Greg Symons <gsymons@affinipay.com> * Rework command-line-settings tests * The original test only coincidentally passed because the broken arg parsing didn't actually modify the command-line: * The -D argument _should_ have been consumed during argument parsing, but wasn't, so remained in residual. * The test app would not have outputted the -D argument had argument parsing been working, since it only output the app args, not the system properties. * There is now a specific test each for the system properties and the residual args. Signed-off-by: Greg Symons <gsymons@affinipay.com>
- Loading branch information
1 parent
4522634
commit c8c04fb
Showing
4 changed files
with
26 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
src/sbt-test/ash/command-line-settings/src/main/scala/MainApp.scala
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
object MainApp extends App { | ||
object MainApp extends App { | ||
println(sys.props.collect { case (k, v) => s"$k=$v" } mkString "\n") | ||
println(args.mkString("|")) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
# Run the staging and check the script. | ||
> stage | ||
$ exists target/universal/stage/bin/command-line-app | ||
> runCheck | ||
> checkSystemProperty | ||
> checkResidual |