From 0eb8555425c24b6f57cda0a207ef2ad559e6baf2 Mon Sep 17 00:00:00 2001 From: Gerhard Aigner Date: Fri, 25 Feb 2022 10:37:43 +0100 Subject: [PATCH] Indicate defaults in comandline help (#44223) Co-authored-by: Gerhard Aigner Co-authored-by: Jameson Nash --- doc/man/julia.1 | 151 +++++++++++++++---------- doc/src/manual/command-line-options.md | 51 +++++---- src/jloptions.c | 138 +++++++++++----------- test/cmdlineargs.jl | 2 +- 4 files changed, 196 insertions(+), 146 deletions(-) diff --git a/doc/man/julia.1 b/doc/man/julia.1 index 552c45eb131a29..3e0bc9cf6b2b2b 100644 --- a/doc/man/julia.1 +++ b/doc/man/julia.1 @@ -21,16 +21,18 @@ .\" - diagnostics .\" - notes -.TH JULIA 1 2013-12-10 Julia "Julia Programmers' Reference Guide" +.TH JULIA 1 2022-02-17 JULIA .\" from the front page of https://julialang.org/ .SH NAME julia - a high-level, high-performance dynamic programming language for technical computing .SH SYNOPSIS -julia [option] [program] [args..] +\fBjulia\fR [OPTIONS...] \fB--\fR [PROGRAMMFILE] [ARGS...] + +If a Julia source file is given as a \fIPROGRAMFILE\fP (optionally followed by +arguments in \fIARGS\fP) Julia will execute the program and exit. -.\" Taken almost verbatim from the front page of https://julialang.org/ .SH DESCRIPTION Julia is a high-level, high-performance dynamic programming language for technical computing, with syntax that is familiar to users @@ -49,10 +51,6 @@ For a more in-depth discussion of the rationale and advantages of Julia over other systems, please see the online manual: https://docs.julialang.org -If a Julia source file is given as a \fIprogram\fP (optionally followed by - arguments in \fIargs\fP) Julia will execute the program and exit. - -.\" This section was taken nearly verbatim from the output of `julia --help` .SH "COMMAND-LINE OPTIONS" .TP @@ -63,6 +61,10 @@ Display version information -h, --help Print help message +.TP +--help-hidden +Print uncommon options not shown by `-h` + .TP --project[=/@.] Set as the home project/environment. The default @. option will search @@ -73,22 +75,27 @@ found. -J, --sysimage Start up with the given system image file -.TP ---sysimage-native-code={yes|no} -Use precompiled code from system image if available - .TP -H, --home Set location of julia executable .TP ---startup-file={yes|no} -Load ~/.julia/config/startup.jl +--startup-file={yes*|no} +Load `JULIA_DEPOT_PATH/config/startup.jl`; if `JULIA_DEPOT_PATH` +environment variable is unset, load `~/.julia/config/startup.jl` .TP ---handle-signals={yes|no} +--handle-signals={yes*|no} Enable or disable Julia's default signal handlers +.TP +--sysimage-native-code={yes*|no} +Use native code from system image if available + +.TP +--compiled-modules={yes*|no} +Enable or disable incremental precompilation of modules + .TP -e, --eval Evaluate @@ -112,8 +119,9 @@ process affinity is not configured, it uses the number of CPU threads. .TP --p, --procs -Run n local processes +-p, --procs {N|auto} +Integer value N launches N additional local worker processes `auto` launches as many workers +as the number of local CPU threads (logical cores) .TP --machine-file @@ -121,68 +129,86 @@ Run processes on hosts listed in .TP -i -Interactive mode; REPL runs and isinteractive() is true +Interactive mode; REPL runs and `isinteractive()` is true + +.TP +-q, --quiet +Quiet startup: no banner, suppress REPL warnings .TP ---banner={yes|no|auto} +--banner={yes|no|auto*} Enable or disable startup banner .TP ---color={yes|no|auto} +--color={yes|no|auto*} Enable or disable color text .TP ---history-file={yes|no} +--history-file={yes*|no} Load or save history .TP ---compile={yes|no|all|min} -Enable or disable compiler, or request exhaustive or minimal compilation +--depwarn={yes|no*|error} +Enable or disable syntax and method deprecation warnings (`error` turns warnings into errors) .TP --C, --cpu-target= -Limit usage of cpu features up to +--warn-overwrite={yes|no*} +Enable or disable method overwrite warnings .TP --O, --optimize -Run time-intensive code optimizations +--warn-scope={yes*|no} +Enable or disable warning for ambiguous top-level scope .TP --O , --optimize= -Set the optimization level to +-C, --cpu-target= +Limit usage of CPU features up to ; set to `help` to see the available options .TP ---min-optlevel= -Set the minimum optimization level to , overriding per-module settings +-O, --optimize={0,1,2*,3} +Set the optimization level (level 3 if `-O` is used without a level) .TP --g -Enable generation of full debug info +--min-optlevel={0*,1,2,3} +Set a lower bound on the optimization level .TP --g -Set the level of debug info generation to +-g {0,1*,2} +Set the level of debug info generation (level 2 if `-g` is used without a level) .TP ---inline={yes|no} -Control whether inlining is permitted (overrides functions declared as @inline) +--inline={yes*|no} +Control whether inlining is permitted, including overriding @inline declarations .TP ---check-bounds={yes|no|auto} +--check-bounds={yes|no|auto*} Emit bounds checks always, never, or respect @inbounds declarations .TP --math-mode={ieee|user} -Always use IEEE semantics for math (ignoring declarations), -or adhere to declarations in source code +Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration) .TP ---depwarn={yes|no|error} -Enable or disable syntax and method deprecation warnings ('error' turns warnings into errors) +--code-coverage[={none*|user|all}] +Count executions of source lines (omitting setting is equivalent to `user`) .TP ---warn-overwrite={yes|no} -Enable or disable method overwrite warnings + --code-coverage=tracefile.info + Append coverage information to the LCOV tracefile (filename supports format tokens) + +.TP +--track-allocation[={none*|user|all}] +Count bytes allocated by each source line (omitting setting is equivalent to `user`) + +.TP +--bug-report=KIND +Launch a bug report session. It can be used to start a REPL, run a script, or evaluate +expressions. It first tries to use BugReporting.jl installed in current environment and +fallbacks to the latest compatible BugReporting.jl if not. For more information, see +--bug-report=help. + +.TP +--compile={yes*|no|all|min} +Enable or disable JIT compiler, or request exhaustive or minimal compilation .TP --output-o @@ -192,36 +218,45 @@ Generate an object file (including system image data) --output-ji Generate a system image data file (.ji) +.TP +--strip-metadata +Remove docstrings and source location info from system image + +.TP +--strip-ir +Remove IR (intermediate representation) of compiled functions + +.TP +--output-unopt-bc +Generate unoptimized LLVM bitcode (.bc) + .TP --output-bc Generate LLVM bitcode (.bc) .TP ---output-incremental={yes|no} -Generate an incremental output file (rather than complete) +--output-asm +Generate an assembly file (.s) .TP ---code-coverage={none|user|all}, --code-coverage -Count executions of source lines (omitting setting is equivalent to 'user') +--output-incremental={yes|no*} +Generate an incremental output file (rather than complete) .TP ---track-allocation={none|user|all}, --track-allocation -Count bytes allocated by each source line +--trace-compile={stderr,name} +Print precompile statements for methods compiled during execution or save to a path -.SH FILES -.I ~/.julia/config/startup.jl -.RS -Per user startup file. -.RE +.TP +-image-codegen +Force generate code in imaging mode -.I /etc/julia/startup.jl -.RS -System-wide startup file. -.RE +.SH FILES AND ENVIRONMENT +See https://docs.julialang.org/en/v1/manual/environment-variables/ .SH BUGS Please report any bugs using the GitHub issue tracker: https://github.com/julialang/julia/issues?state=open + .SH AUTHORS Contributors: https://github.com/JuliaLang/julia/graphs/contributors diff --git a/doc/src/manual/command-line-options.md b/doc/src/manual/command-line-options.md index 387c0d9d896bd9..42047136ec82bd 100644 --- a/doc/src/manual/command-line-options.md +++ b/doc/src/manual/command-line-options.md @@ -72,20 +72,20 @@ There are various ways to run Julia code and provide options, similar to those a julia [switches] -- [programfile] [args...] ``` -The following is a complete list of command-line switches available when launching julia, e.g. - +The following is a complete list of command-line switches available when launching julia (a '*' marks the default value, if applicable): |Switch |Description| |:--- |:---| |`-v`, `--version` |Display version information| |`-h`, `--help` |Print command-line options (this message).| +|`--help-hidden` |Uncommon options not shown by `-h`| |`--project[={\|@.}]` |Set `` as the home project/environment. The default `@.` option will search through parent directories until a `Project.toml` or `JuliaProject.toml` file is found.| |`-J`, `--sysimage ` |Start up with the given system image file| |`-H`, `--home ` |Set location of `julia` executable| -|`--startup-file={yes\|no}` |Load `~/.julia/config/startup.jl`| -|`--handle-signals={yes\|no}` |Enable or disable Julia's default signal handlers| -|`--sysimage-native-code={yes\|no}` |Use native code from system image if available| -|`--compiled-modules={yes\|no}` |Enable or disable incremental precompilation of modules| +|`--startup-file={yes*\|no}` |Load `JULIA_DEPOT_PATH/config/startup.jl`; if `JULIA_DEPOT_PATH` environment variable is unset, load `~/.julia/config/startup.jl`| +|`--handle-signals={yes*\|no}` |Enable or disable Julia's default signal handlers| +|`--sysimage-native-code={yes*\|no}` |Use native code from system image if available| +|`--compiled-modules={yes*\|no}` |Enable or disable incremental precompilation of modules| |`-e`, `--eval ` |Evaluate ``| |`-E`, `--print ` |Evaluate `` and display the result| |`-L`, `--load ` |Load `` immediately on all processors| @@ -94,23 +94,34 @@ The following is a complete list of command-line switches available when launchi |`--machine-file ` |Run processes on hosts listed in ``| |`-i` |Interactive mode; REPL runs and `isinteractive()` is true| |`-q`, `--quiet` |Quiet startup: no banner, suppress REPL warnings| -|`--banner={yes\|no\|auto}` |Enable or disable startup banner| -|`--color={yes\|no\|auto}` |Enable or disable color text| -|`--history-file={yes\|no}` |Load or save history| -|`--depwarn={yes\|no\|error}` |Enable or disable syntax and method deprecation warnings (`error` turns warnings into errors)| -|`--warn-overwrite={yes\|no}` |Enable or disable method overwrite warnings| +|`--banner={yes\|no\|auto*}` |Enable or disable startup banner| +|`--color={yes\|no\|auto*}` |Enable or disable color text| +|`--history-file={yes*\|no}` |Load or save history| +|`--depwarn={yes\|no*\|error}` |Enable or disable syntax and method deprecation warnings (`error` turns warnings into errors)| +|`--warn-overwrite={yes\|no*}` |Enable or disable method overwrite warnings| +|`--warn-scope={yes*\|no}` |Enable or disable warning for ambiguous top-level scope| |`-C`, `--cpu-target ` |Limit usage of CPU features up to ``; set to `help` to see the available options| -|`-O`, `--optimize={0,1,2,3}` |Set the optimization level (default level is 2 if unspecified or 3 if used without a level)| -|`--min-optlevel={0,1,2,3}` |Set the lower bound on per-module optimization (default is 0)| -|`-g`, `-g ` |Enable or set the level of debug info generation (default level is 1 if unspecified or 2 if used without a level)| +|`-O`, `--optimize={0,1,2*,3}` |Set the optimization level (level is 3 if `-O` is used without a level)| +|`--min-optlevel={0*,1,2,3}` |Set the lower bound on per-module optimization| +|`-g {0,1*,2}` |Set the level of debug info generation (level is 2 if `-g` is used without a level)| |`--inline={yes\|no}` |Control whether inlining is permitted, including overriding `@inline` declarations| -|`--check-bounds={yes\|no\|auto}` |Emit bounds checks always, never, or respect `@inbounds` declarations| +|`--check-bounds={yes\|no\|auto*}` |Emit bounds checks always, never, or respect `@inbounds` declarations| |`--math-mode={ieee,fast}` |Disallow or enable unsafe floating point optimizations (overrides `@fastmath` declaration)| -|`--code-coverage={none\|user\|all}` |Count executions of source lines| -|`--code-coverage` |equivalent to `--code-coverage=user`| -|`--track-allocation={none\|user\|all}` |Count bytes allocated by each source line| -|`--track-allocation` |equivalent to `--track-allocation=user`| - +|`--code-coverage[={none*\|user\|all}]` |Count executions of source lines (omitting setting is equivalent to `user`)| +|`--code-coverage=tracefile.info` |Append coverage information to the LCOV tracefile (filename supports format tokens).| +|`--track-allocation[={none*\|user\|all}]` |Count bytes allocated by each source line (omitting setting is equivalent to "user")| +|`--bug-report=KIND` |Launch a bug report session. It can be used to start a REPL, run a script, or evaluate expressions. It first tries to use BugReporting.jl installed in current environment and fallbacks to the latest compatible BugReporting.jl if not. For more nformation, see `--bug-report=help`.| +|`--compile={yes*\|no\|all\|min}` |Enable or disable JIT compiler, or request exhaustive or minimal compilation| +|`--output-o ` |Generate an object file (including system image data)| +|`--output-ji ` |Generate a system image data file (.ji)| +|`--strip-metadata` |Remove docstrings and source location info from system image| +|`--strip-ir` |Remove IR (intermediate representation) of compiled functions| +|`--output-unopt-bc ` |Generate unoptimized LLVM bitcode (.bc)| +|`--output-bc ` |Generate LLVM bitcode (.bc)| +|`--output-asm ` |Generate an assembly file (.s)| +|`--output-incremental={yes\|no*}` |Generate an incremental output file (rather than complete)| +|`--trace-compile={stderr,name}` |Print precompile statements for methods compiled during execution or save to a path| +|`--image-codegen` |Force generate code in imaging mode| !!! compat "Julia 1.1" diff --git a/src/jloptions.c b/src/jloptions.c index 40a10fd63a6267..bd18ef4043cf56 100644 --- a/src/jloptions.c +++ b/src/jloptions.c @@ -74,7 +74,7 @@ JL_DLLEXPORT void jl_init_options(void) NULL, // output-o NULL, // output-asm NULL, // output-ji - NULL, // output-code_coverage + NULL, // output-code_coverage 0, // incremental 0, // image_file_specified JL_OPTIONS_WARN_SCOPE_ON, // ambiguous scope warning @@ -86,102 +86,106 @@ JL_DLLEXPORT void jl_init_options(void) jl_options_initialized = 1; } -static const char usage[] = "julia [switches] -- [programfile] [args...]\n"; +static const char usage[] = "\n julia [switches] -- [programfile] [args...]\n\n"; static const char opts[] = - " -v, --version Display version information\n" - " -h, --help Print this message (--help-hidden for more)\n" - " --help-hidden Uncommon options not shown by `-h`\n\n" + "Switches (a '*' marks the default value, if applicable):\n\n" + " -v, --version Display version information\n" + " -h, --help Print this message (--help-hidden for more)\n" + " --help-hidden Uncommon options not shown by `-h`\n\n" // startup options - " --project[={|@.}] Set as the home project/environment\n" - " -J, --sysimage Start up with the given system image file\n" - " -H, --home Set location of `julia` executable\n" - " --startup-file={yes|no} Load `~/.julia/config/startup.jl`\n" - " --handle-signals={yes|no} Enable or disable Julia's default signal handlers\n" - " --sysimage-native-code={yes|no}\n" - " Use native code from system image if available\n" - " --compiled-modules={yes|no}\n" - " Enable or disable incremental precompilation of modules\n\n" + " --project[={|@.}] Set as the home project/environment\n" + " -J, --sysimage Start up with the given system image file\n" + " -H, --home Set location of `julia` executable\n" + " --startup-file={yes*|no} Load `JULIA_DEPOT_PATH/config/startup.jl`; if `JULIA_DEPOT_PATH`\n" + " environment variable is unset, load `~/.julia/config/startup.jl`\n" + " --handle-signals={yes*|no} Enable or disable Julia's default signal handlers\n" + " --sysimage-native-code={yes*|no}\n" + " Use native code from system image if available\n" + " --compiled-modules={yes*|no}\n" + " Enable or disable incremental precompilation of modules\n\n" // actions - " -e, --eval Evaluate \n" - " -E, --print Evaluate and display the result\n" - " -L, --load Load immediately on all processors\n\n" + " -e, --eval Evaluate \n" + " -E, --print Evaluate and display the result\n" + " -L, --load Load immediately on all processors\n\n" // parallel options - " -t, --threads {N|auto} Enable N threads; \"auto\" tries to infer a useful default number\n" - " of threads to use but the exact behavior might change in the future.\n" - " Currently, \"auto\" uses the number of CPUs assigned to this julia\n" - " process based on the OS-specific affinity assignment interface, if\n" - " supported (Linux and Windows). If this is not supported (macOS) or\n" - " process affinity is not configured, it uses the number of CPU\n" - " threads.\n" - " -p, --procs {N|auto} Integer value N launches N additional local worker processes\n" - " \"auto\" launches as many workers as the number of local CPU threads (logical cores)\n" - " --machine-file Run processes on hosts listed in \n\n" + " -t, --threads {N|auto} Enable N threads; \"auto\" tries to infer a useful default number\n" + " of threads to use but the exact behavior might change in the future.\n" + " Currently, \"auto\" uses the number of CPUs assigned to this julia\n" + " process based on the OS-specific affinity assignment interface, if\n" + " supported (Linux and Windows). If this is not supported (macOS) or\n" + " process affinity is not configured, it uses the number of CPU\n" + " threads.\n" + " -p, --procs {N|auto} Integer value N launches N additional local worker processes\n" + " \"auto\" launches as many workers as the number of local CPU threads (logical cores)\n" + " --machine-file Run processes on hosts listed in \n\n" // interactive options - " -i Interactive mode; REPL runs and isinteractive() is true\n" - " -q, --quiet Quiet startup: no banner, suppress REPL warnings\n" - " --banner={yes|no|auto} Enable or disable startup banner\n" - " --color={yes|no|auto} Enable or disable color text\n" - " --history-file={yes|no} Load or save history\n\n" + " -i Interactive mode; REPL runs and `isinteractive()` is true\n" + " -q, --quiet Quiet startup: no banner, suppress REPL warnings\n" + " --banner={yes|no|auto*} Enable or disable startup banner\n" + " --color={yes|no|auto*} Enable or disable color text\n" + " --history-file={yes*|no} Load or save history\n\n" // error and warning options - " --depwarn={yes|no|error} Enable or disable syntax and method deprecation warnings (\"error\" turns warnings into errors)\n" - " --warn-overwrite={yes|no} Enable or disable method overwrite warnings\n" - " --warn-scope={yes|no} Enable or disable warning for ambiguous top-level scope\n\n" + " --depwarn={yes|no*|error} Enable or disable syntax and method deprecation warnings (`error` turns warnings into errors)\n" + " --warn-overwrite={yes|no*} Enable or disable method overwrite warnings\n" + " --warn-scope={yes*|no} Enable or disable warning for ambiguous top-level scope\n\n" // code generation options - " -C, --cpu-target Limit usage of CPU features up to ; set to \"help\" to see the available options\n" - " -O, --optimize={0,1,2,3} Set the optimization level (default level is 2 if unspecified or 3 if used without a level)\n" - " --min-optlevel={0,1,2,3} Set a lower bound on the optimization level (default is 0)\n" - " -g, -g Enable or set the level of debug info generation" + " -C, --cpu-target Limit usage of CPU features up to ; set to `help` to see the available options\n" + " -O, --optimize={0,1,2*,3} Set the optimization level (level 3 if `-O` is used without a level)\n" + " --min-optlevel={0*,1,2,3} Set a lower bound on the optimization level\n" #ifdef JL_DEBUG_BUILD - " (default level for julia-debug is 2 if unspecified or if used without a level)\n" + " -g [{0,1,2*}] Set the level of debug info generation in the julia-debug build\n" #else - " (default level is 1 if unspecified or 2 if used without a level)\n" + " -g [{0,1*,2}] Set the level of debug info generation (level 2 if `-g` is used without a level)\n" #endif - " --inline={yes|no} Control whether inlining is permitted, including overriding @inline declarations\n" - " --check-bounds={yes|no|auto}\n" - " Emit bounds checks always, never, or respect @inbounds declarations\n" + " --inline={yes*|no} Control whether inlining is permitted, including overriding @inline declarations\n" + " --check-bounds={yes|no|auto*}\n" + " Emit bounds checks always, never, or respect @inbounds declarations\n" #ifdef USE_POLLY - " --polly={yes|no} Enable or disable the polyhedral optimizer Polly (overrides @polly declaration)\n" + " --polly={yes*|no} Enable or disable the polyhedral optimizer Polly (overrides @polly declaration)\n" #endif - " --math-mode={ieee,fast} Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration)\n\n" + " --math-mode={ieee,fast} Disallow or enable unsafe floating point optimizations (overrides @fastmath declaration)\n\n" // instrumentation options - " --code-coverage={none|user|all}, --code-coverage\n" - " Count executions of source lines (omitting setting is equivalent to \"user\")\n" + " --code-coverage[={none*|user|all}]\n" + " Count executions of source lines (omitting setting is equivalent to `user`)\n" " --code-coverage=tracefile.info\n" - " Append coverage information to the LCOV tracefile (filename supports format tokens).\n" + " Append coverage information to the LCOV tracefile (filename supports format tokens)\n" // TODO: These TOKENS are defined in `runtime_ccall.cpp`. A more verbose `--help` should include that list here. - " --track-allocation={none|user|all}, --track-allocation\n" - " Count bytes allocated by each source line (omitting setting is equivalent to \"user\")\n" - " --bug-report=KIND Launch a bug report session. It can be used to start a REPL, run a script, or evaluate\n" - " expressions. It first tries to use BugReporting.jl installed in current environment and\n" - " fallbacks to the latest compatible BugReporting.jl if not. For more information, see\n" - " --bug-report=help.\n\n" + " --track-allocation[={none*|user|all}]\n" + " Count bytes allocated by each source line (omitting setting is equivalent to `user`)\n" + " --bug-report=KIND Launch a bug report session. It can be used to start a REPL, run a script, or evaluate\n" + " expressions. It first tries to use BugReporting.jl installed in current environment and\n" + " fallbacks to the latest compatible BugReporting.jl if not. For more information, see\n" + " --bug-report=help.\n\n" ; static const char opts_hidden[] = + "Switches (a '*' marks the default value, if applicable):\n\n" // code generation options - " --compile={yes|no|all|min}Enable or disable JIT compiler, or request exhaustive or minimal compilation\n" + " --compile={yes*|no|all|min}\n" + " Enable or disable JIT compiler, or request exhaustive or minimal compilation\n\n" // compiler output options - " --output-o name Generate an object file (including system image data)\n" - " --output-ji name Generate a system image data file (.ji)\n" - " --strip-metadata Remove docstrings and source location info from system image\n" - " --strip-ir Remove IR (intermediate representation) of compiled functions\n" + " --output-o Generate an object file (including system image data)\n" + " --output-ji Generate a system image data file (.ji)\n" + " --strip-metadata Remove docstrings and source location info from system image\n" + " --strip-ir Remove IR (intermediate representation) of compiled functions\n\n" // compiler debugging (see the devdocs for tips on using these options) - " --output-unopt-bc name Generate unoptimized LLVM bitcode (.bc)\n" - " --output-bc name Generate LLVM bitcode (.bc)\n" - " --output-asm name Generate an assembly file (.s)\n" - " --output-incremental=no Generate an incremental output file (rather than complete)\n" + " --output-unopt-bc Generate unoptimized LLVM bitcode (.bc)\n" + " --output-bc Generate LLVM bitcode (.bc)\n" + " --output-asm Generate an assembly file (.s)\n" + " --output-incremental={yes|no*}\n" + " Generate an incremental output file (rather than complete)\n" " --trace-compile={stderr,name}\n" - " Print precompile statements for methods compiled during execution or save to a path\n\n" - " --image-codegen Force generate code in imaging mode\n" + " Print precompile statements for methods compiled during execution or save to a path\n" + " --image-codegen Force generate code in imaging mode\n" ; JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp) @@ -242,7 +246,7 @@ JL_DLLEXPORT void jl_parse_opts(int *argcp, char ***argvp) { "bug-report", required_argument, 0, opt_bug_report }, { "sysimage", required_argument, 0, 'J' }, { "sysimage-native-code", required_argument, 0, opt_sysimage_native_code }, - { "compiled-modules", required_argument, 0, opt_compiled_modules }, + { "compiled-modules",required_argument, 0, opt_compiled_modules }, { "cpu-target", required_argument, 0, 'C' }, { "procs", required_argument, 0, 'p' }, { "threads", required_argument, 0, 't' }, diff --git a/test/cmdlineargs.jl b/test/cmdlineargs.jl index 0a03e60f6dd03c..8f11f6a6c7a441 100644 --- a/test/cmdlineargs.jl +++ b/test/cmdlineargs.jl @@ -123,7 +123,7 @@ let exename = `$(Base.julia_cmd()) --startup-file=no --color=no` @test read(`$exename -v`, String) == read(`$exename --version`, String) # --help - let header = "julia [switches] -- [programfile] [args...]" + let header = "\n julia [switches] -- [programfile] [args...]" @test startswith(read(`$exename -h`, String), header) @test startswith(read(`$exename --help`, String), header) end