summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
authorcyqsimon <28627918+cyqsimon@users.noreply.github.com>2024-01-19 15:18:48 +0800
committercyqsimon <28627918+cyqsimon@users.noreply.github.com>2024-01-19 15:18:48 +0800
commit230abfd2bc146aaf2c2ea7d2685c97cd22dc0bc2 (patch)
tree207db1f4d8999345b66677d08d01489c41f44801 /tests
parentc0f2d6f934754a520df7303ab2e05ff5b39d1b43 (diff)
parent98a2b6bc177050c845f2e12133458826ad1fca72 (diff)
Merge branch 'master' into syntax-mapping-refactor
Diffstat (limited to 'tests')
-rw-r--r--tests/syntax-tests/highlighted/JQ/sample.jq32
-rw-r--r--tests/syntax-tests/highlighted/cmd-help/test.cmd-help4
2 files changed, 18 insertions, 18 deletions
diff --git a/tests/syntax-tests/highlighted/JQ/sample.jq b/tests/syntax-tests/highlighted/JQ/sample.jq
index ba9c853f..057e9edd 100644
--- a/tests/syntax-tests/highlighted/JQ/sample.jq
+++ b/tests/syntax-tests/highlighted/JQ/sample.jq
@@ -1,31 +1,31 @@
import "../imported-file" ;
# With Comments !
-def weird($a; $b; $c):
- [ $a, $b, $c ] | transpose | reduce .[][] as $item (
- [];
- . + $item.property
- )
+def weird($a; $b; $c):
+ [ $a, $b, $c ] | transpose | reduce .[][] as $item (
+ [];
+ . + $item.property
+ )
;
-. | weird (.a; .b; .c) |
+. | weird (.a; .b; .c) |
(
-if (. | contains("never") ) then
+if (. | contains("never") ) then
 "Why yes"
else
 12.23
end
-) as $never |
+) as $never |
{
 hello,
 why: "because",
- hello: ( weird | ascii_upcase ),
- format_eg: ( . | @json "My json string \( . | this | part | just | white | ascii_upcase | transpose)" ),
- never: $never,
+ hello: ( weird | ascii_upcase ),
+ format_eg: ( . | @json "My json string \( . | this | part | just | white | ascii_upcase | transpose)" ),
+ never: $never,
 "literal_key": literal_value,
 "this": 12.1e12,
 "part": "almost"
@@ -38,8 +38,8 @@
 similar: "but not quite"
 }
 }
- ],
-} | (
+ ],
+} | (
 
 # And with very basic brace matching
 
@@ -47,13 +47,13 @@
 ] 
 
 # Other invalid ends
- ( [ } ] )
+ ( [ } ] )
 # A "valid" sequence
- ( [ { key: () , other_key:( [ [] [[]] ] ), gaga } ] )
+ ( [ { key: () , other_key:( [ [] [[]] ] ), gaga } ] )
 # A "invalid" sequence
- ( [ { key: () , other_key:( [ [] [[] ] ), gaga } ] )
+ ( [ { key: () , other_key:( [ [] [[] ] ), gaga } ] )
 "A string\n whith escaped characters \" because we can"
)
diff --git a/tests/syntax-tests/highlighted/cmd-help/test.cmd-help b/tests/syntax-tests/highlighted/cmd-help/test.cmd-help
index d71c2af0..d8f1236d 100644
--- a/tests/syntax-tests/highlighted/cmd-help/test.cmd-help
+++ b/tests/syntax-tests/highlighted/cmd-help/test.cmd-help
@@ -4,8 +4,8 @@
Use '--help' instead of '-h' to see a more detailed version of the help text.
USAGE:
- bat [OPTIONS] [FILE]...
- bat <SUBCOMMAND>
+ bat [OPTIONS] [FILE]...
+ bat <SUBCOMMAND>
ARGS:
 <FILE>... File(s) to print / concatenate. Use '-' for standard input.