mirror of
https://github.com/google/go-jsonnet.git
synced 2025-09-28 17:01:02 +02:00
Add test output overrides for jsonnetfmt.
This commit is contained in:
parent
e6a9581713
commit
7373f5b606
35
testdata/cpp-tests-override/fmt_help.golden.stdout
vendored
Normal file
35
testdata/cpp-tests-override/fmt_help.golden.stdout
vendored
Normal file
@ -0,0 +1,35 @@
|
||||
Jsonnet reformatter v0.17.0
|
||||
|
||||
jsonnetfmt {<option>} { <filename> }
|
||||
|
||||
Available options:
|
||||
-h / --help This message
|
||||
-e / --exec Treat filename as code
|
||||
-o / --output-file <file> Write to the output file rather than stdout
|
||||
-c / --create-output-dirs Automatically creates all parent directories for
|
||||
files
|
||||
-i / --in-place Update the Jsonnet file(s) in place
|
||||
--test Exit with failure if reformatting changed the
|
||||
file(s)
|
||||
-n / --indent <n> Number of spaces to indent by
|
||||
(default 2, 0 means no change)
|
||||
--max-blank-lines <n> Max vertical spacing (default 2, 0 means no change)
|
||||
--string-style <d|s|l> Enforce double, single (default) quotes or 'leave'
|
||||
--comment-style <h|s|l> # (h), // (s) (default), or 'leave'; never changes
|
||||
she-bang
|
||||
--[no-]pretty-field-names Use syntax sugar for fields and indexing
|
||||
(on by default)
|
||||
--[no-]pad-arrays [ 1, 2, 3 ] instead of [1, 2, 3]
|
||||
--[no-]pad-objects { x: 1, y: 2 } instead of {x: 1, y: 2}
|
||||
(on by default)
|
||||
--[no-]sort-imports Sorting of imports (on by default)
|
||||
--[no-]use-implicit-plus Remove plus signs where they are not required
|
||||
(on by default)
|
||||
--version Print version
|
||||
|
||||
In all cases:
|
||||
<filename> can be - (stdin)
|
||||
Multichar options are expanded e.g. -abc becomes -a -b -c.
|
||||
The -- option suppresses option processing for subsequent arguments.
|
||||
Note that since filenames and jsonnet programs can begin with -, it is
|
||||
advised to use -- if the argument is unknown, e.g. jsonnetfmt -- "$FILENAME".
|
37
testdata/cpp-tests-override/fmt_no_args.golden.stderr
vendored
Normal file
37
testdata/cpp-tests-override/fmt_no_args.golden.stderr
vendored
Normal file
@ -0,0 +1,37 @@
|
||||
ERROR: must give filename
|
||||
|
||||
Jsonnet reformatter v0.17.0
|
||||
|
||||
jsonnetfmt {<option>} { <filename> }
|
||||
|
||||
Available options:
|
||||
-h / --help This message
|
||||
-e / --exec Treat filename as code
|
||||
-o / --output-file <file> Write to the output file rather than stdout
|
||||
-c / --create-output-dirs Automatically creates all parent directories for
|
||||
files
|
||||
-i / --in-place Update the Jsonnet file(s) in place
|
||||
--test Exit with failure if reformatting changed the
|
||||
file(s)
|
||||
-n / --indent <n> Number of spaces to indent by
|
||||
(default 2, 0 means no change)
|
||||
--max-blank-lines <n> Max vertical spacing (default 2, 0 means no change)
|
||||
--string-style <d|s|l> Enforce double, single (default) quotes or 'leave'
|
||||
--comment-style <h|s|l> # (h), // (s) (default), or 'leave'; never changes
|
||||
she-bang
|
||||
--[no-]pretty-field-names Use syntax sugar for fields and indexing
|
||||
(on by default)
|
||||
--[no-]pad-arrays [ 1, 2, 3 ] instead of [1, 2, 3]
|
||||
--[no-]pad-objects { x: 1, y: 2 } instead of {x: 1, y: 2}
|
||||
(on by default)
|
||||
--[no-]sort-imports Sorting of imports (on by default)
|
||||
--[no-]use-implicit-plus Remove plus signs where they are not required
|
||||
(on by default)
|
||||
--version Print version
|
||||
|
||||
In all cases:
|
||||
<filename> can be - (stdin)
|
||||
Multichar options are expanded e.g. -abc becomes -a -b -c.
|
||||
The -- option suppresses option processing for subsequent arguments.
|
||||
Note that since filenames and jsonnet programs can begin with -, it is
|
||||
advised to use -- if the argument is unknown, e.g. jsonnetfmt -- "$FILENAME".
|
Loading…
x
Reference in New Issue
Block a user