Skip to content
This repository was archived by the owner on Dec 12, 2024. It is now read-only.

Commit 65c7f17

Browse files
hugoplnobodywasishere
authored andcommitted
Format test results using tree-sitter test -u.
A linter for this would be welcome.
1 parent 61d5b2c commit 65c7f17

File tree

2 files changed

+135
-109
lines changed

2 files changed

+135
-109
lines changed

test/corpus/literals.txt

Lines changed: 120 additions & 95 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,8 @@ Quoted string literals
77
---
88

99
(source_file
10-
(string (quoted_string)))
10+
(string
11+
(quoted_string)))
1112

1213
=======================
1314
Percent string literals
@@ -28,12 +29,18 @@ Percent string literals
2829
---
2930

3031
(source_file
31-
(string (percent_string))
32-
(string (percent_string))
33-
(string (percent_string))
34-
(string (percent_string))
35-
(string (percent_string))
36-
(string (percent_string)))
32+
(string
33+
(percent_string))
34+
(string
35+
(percent_string))
36+
(string
37+
(percent_string))
38+
(string
39+
(percent_string))
40+
(string
41+
(percent_string))
42+
(string
43+
(percent_string)))
3744

3845
==============
3946
Regex literals
@@ -48,10 +55,10 @@ Regex literals
4855
---
4956

5057
(source_file
51-
(regex_literal)
52-
(string
53-
(quoted_string))
54-
(regex_literal))
58+
(regex_literal)
59+
(string
60+
(quoted_string))
61+
(regex_literal))
5562

5663
================
5764
Integer literals
@@ -70,11 +77,11 @@ Integer literals
7077
---
7178

7279
(source_file
73-
(integer)
74-
(integer)
75-
(integer)
76-
(integer)
77-
(integer))
80+
(integer)
81+
(integer)
82+
(integer)
83+
(integer)
84+
(integer))
7885

7986
==============
8087
Float literals
@@ -89,9 +96,9 @@ Float literals
8996
---
9097

9198
(source_file
92-
(float)
93-
(float)
94-
(float))
99+
(float)
100+
(float)
101+
(float))
95102

96103
===========
97104
Nil literal
@@ -101,7 +108,8 @@ nil
101108

102109
---
103110

104-
(source_file (nil))
111+
(source_file
112+
(nil))
105113

106114
================
107115
Boolean literals
@@ -112,7 +120,9 @@ false
112120

113121
---
114122

115-
(source_file (true) (false))
123+
(source_file
124+
(true)
125+
(false))
116126

117127
==============
118128
Array literals
@@ -127,15 +137,18 @@ Array literals
127137
---
128138

129139
(source_file
130-
(array
131-
(integer)
132-
(integer)
133-
(integer))
134-
(array
135-
(string (quoted_string))
136-
(string (quoted_string))
137-
(constant))
138-
(array (constant)))
140+
(array
141+
(integer)
142+
(integer)
143+
(integer))
144+
(array
145+
(string
146+
(quoted_string))
147+
(string
148+
(quoted_string))
149+
(constant))
150+
(array
151+
(constant)))
139152

140153
=============
141154
Hash literals
@@ -152,24 +165,28 @@ Hash literals
152165
---
153166

154167
(source_file
155-
(hash
156-
(string (quoted_string))
157-
(string (quoted_string)))
158-
(hash
159-
(integer)
160-
(string (quoted_string))
161-
(integer)
162-
(string (quoted_string)))
163-
(hash
164-
(constant)
165-
(constant))
166-
(hash
167-
(float)
168-
(integer)
169-
(float)
170-
(integer)
171-
(constant)
172-
(constant)))
168+
(hash
169+
(string
170+
(quoted_string))
171+
(string
172+
(quoted_string)))
173+
(hash
174+
(integer)
175+
(string
176+
(quoted_string))
177+
(integer)
178+
(string
179+
(quoted_string)))
180+
(hash
181+
(constant)
182+
(constant))
183+
(hash
184+
(float)
185+
(integer)
186+
(float)
187+
(integer)
188+
(constant)
189+
(constant)))
173190

174191
=============
175192
Proc literals
@@ -195,35 +212,43 @@ end
195212
---
196213

197214
(source_file
198-
(proc
199-
(block (brace_block)))
200-
(proc
201-
(constant)
202-
(block (brace_block
203-
(nil))))
204-
(proc
205-
(block (do_end_block
206-
(string (quoted_string)))))
207-
(proc
208-
(proc_param (identifier))
209-
(block (brace_block
210-
(identifier))))
211-
(proc
212-
(proc_param
213-
(identifier))
214-
(proc_param
215-
(identifier))
216-
(block (brace_block)))
217-
(proc
218-
(proc_param
219-
(identifier)
220-
(constant))
221-
(proc_param
222-
(identifier)
223-
(constant))
224-
(block (do_end_block
225-
(identifier)
226-
(identifier)))))
215+
(proc
216+
(block
217+
(brace_block)))
218+
(proc
219+
(constant)
220+
(block
221+
(brace_block
222+
(nil))))
223+
(proc
224+
(block
225+
(do_end_block
226+
(string
227+
(quoted_string)))))
228+
(proc
229+
(proc_param
230+
(identifier))
231+
(block
232+
(brace_block
233+
(identifier))))
234+
(proc
235+
(proc_param
236+
(identifier))
237+
(proc_param
238+
(identifier))
239+
(block
240+
(brace_block)))
241+
(proc
242+
(proc_param
243+
(identifier)
244+
(constant))
245+
(proc_param
246+
(identifier)
247+
(constant))
248+
(block
249+
(do_end_block
250+
(identifier)
251+
(identifier)))))
227252

228253
=============
229254
Char literals
@@ -250,15 +275,15 @@ Char literals
250275
---
251276

252277
(source_file
253-
(char)
254-
(char)
255-
(char)
256-
(char)
257-
(char)
258-
(char)
259-
(char)
260-
(char)
261-
(char))
278+
(char)
279+
(char)
280+
(char)
281+
(char)
282+
(char)
283+
(char)
284+
(char)
285+
(char)
286+
(char))
262287

263288
===============
264289
Symbol literals
@@ -296,12 +321,12 @@ self
296321
---
297322

298323
(source_file
299-
(identifier)
300-
(instance_variable
301-
(identifier))
302-
(class_variable
303-
(identifier))
304-
(self))
324+
(identifier)
325+
(instance_variable
326+
(identifier))
327+
(class_variable
328+
(identifier))
329+
(self))
305330

306331
========
307332
Comments
@@ -314,9 +339,9 @@ Comments
314339
---
315340

316341
(source_file
317-
(comment)
318-
(string
319-
(quoted_string)))
342+
(comment)
343+
(string
344+
(quoted_string)))
320345

321346
================
322347
Pseudo constants

test/corpus/operations.txt

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
===============
22
Infix operators
33
===============
4-
4+
as
55
1 + 1
66

77
2 - 2
@@ -11,16 +11,17 @@ Infix operators
1111
---
1212

1313
(source_file
14-
(binary_operation
15-
(integer)
16-
(operator)
17-
(integer))
18-
(binary_operation
19-
(integer)
20-
(operator)
21-
(integer))
22-
(binary_operation
23-
(integer)
24-
(operator)
25-
(string
26-
(quoted_string))))
14+
(identifier)
15+
(binary_operation
16+
(integer)
17+
(operator)
18+
(integer))
19+
(binary_operation
20+
(integer)
21+
(operator)
22+
(integer))
23+
(binary_operation
24+
(integer)
25+
(operator)
26+
(string
27+
(quoted_string))))

0 commit comments

Comments
 (0)