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

Format test results using tree-sitter test -u. #20

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
215 changes: 120 additions & 95 deletions test/corpus/literals.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@ Quoted string literals
---

(source_file
(string (quoted_string)))
(string
(quoted_string)))

=======================
Percent string literals
Expand All @@ -28,12 +29,18 @@ Percent string literals
---

(source_file
(string (percent_string))
(string (percent_string))
(string (percent_string))
(string (percent_string))
(string (percent_string))
(string (percent_string)))
(string
(percent_string))
(string
(percent_string))
(string
(percent_string))
(string
(percent_string))
(string
(percent_string))
(string
(percent_string)))

==============
Regex literals
Expand All @@ -48,10 +55,10 @@ Regex literals
---

(source_file
(regex_literal)
(string
(quoted_string))
(regex_literal))
(regex_literal)
(string
(quoted_string))
(regex_literal))

================
Integer literals
Expand All @@ -70,11 +77,11 @@ Integer literals
---

(source_file
(integer)
(integer)
(integer)
(integer)
(integer))
(integer)
(integer)
(integer)
(integer)
(integer))

==============
Float literals
Expand All @@ -89,9 +96,9 @@ Float literals
---

(source_file
(float)
(float)
(float))
(float)
(float)
(float))

===========
Nil literal
Expand All @@ -101,7 +108,8 @@ nil

---

(source_file (nil))
(source_file
(nil))

================
Boolean literals
Expand All @@ -112,7 +120,9 @@ false

---

(source_file (true) (false))
(source_file
(true)
(false))

==============
Array literals
Expand All @@ -127,15 +137,18 @@ Array literals
---

(source_file
(array
(integer)
(integer)
(integer))
(array
(string (quoted_string))
(string (quoted_string))
(constant))
(array (constant)))
(array
(integer)
(integer)
(integer))
(array
(string
(quoted_string))
(string
(quoted_string))
(constant))
(array
(constant)))

=============
Hash literals
Expand All @@ -152,24 +165,28 @@ Hash literals
---

(source_file
(hash
(string (quoted_string))
(string (quoted_string)))
(hash
(integer)
(string (quoted_string))
(integer)
(string (quoted_string)))
(hash
(constant)
(constant))
(hash
(float)
(integer)
(float)
(integer)
(constant)
(constant)))
(hash
(string
(quoted_string))
(string
(quoted_string)))
(hash
(integer)
(string
(quoted_string))
(integer)
(string
(quoted_string)))
(hash
(constant)
(constant))
(hash
(float)
(integer)
(float)
(integer)
(constant)
(constant)))

=============
Proc literals
Expand All @@ -195,35 +212,43 @@ end
---

(source_file
(proc
(block (brace_block)))
(proc
(constant)
(block (brace_block
(nil))))
(proc
(block (do_end_block
(string (quoted_string)))))
(proc
(proc_param (identifier))
(block (brace_block
(identifier))))
(proc
(proc_param
(identifier))
(proc_param
(identifier))
(block (brace_block)))
(proc
(proc_param
(identifier)
(constant))
(proc_param
(identifier)
(constant))
(block (do_end_block
(identifier)
(identifier)))))
(proc
(block
(brace_block)))
(proc
(constant)
(block
(brace_block
(nil))))
(proc
(block
(do_end_block
(string
(quoted_string)))))
(proc
(proc_param
(identifier))
(block
(brace_block
(identifier))))
(proc
(proc_param
(identifier))
(proc_param
(identifier))
(block
(brace_block)))
(proc
(proc_param
(identifier)
(constant))
(proc_param
(identifier)
(constant))
(block
(do_end_block
(identifier)
(identifier)))))

=============
Char literals
Expand All @@ -250,15 +275,15 @@ Char literals
---

(source_file
(char)
(char)
(char)
(char)
(char)
(char)
(char)
(char)
(char))
(char)
(char)
(char)
(char)
(char)
(char)
(char)
(char)
(char))

===============
Symbol literals
Expand Down Expand Up @@ -296,12 +321,12 @@ self
---

(source_file
(identifier)
(instance_variable
(identifier))
(class_variable
(identifier))
(self))
(identifier)
(instance_variable
(identifier))
(class_variable
(identifier))
(self))

========
Comments
Expand All @@ -314,9 +339,9 @@ Comments
---

(source_file
(comment)
(string
(quoted_string)))
(comment)
(string
(quoted_string)))

================
Pseudo constants
Expand Down
29 changes: 15 additions & 14 deletions test/corpus/operations.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
===============
Infix operators
===============

as
1 + 1

2 - 2
Expand All @@ -11,16 +11,17 @@ Infix operators
---

(source_file
(binary_operation
(integer)
(operator)
(integer))
(binary_operation
(integer)
(operator)
(integer))
(binary_operation
(integer)
(operator)
(string
(quoted_string))))
(identifier)
(binary_operation
(integer)
(operator)
(integer))
(binary_operation
(integer)
(operator)
(integer))
(binary_operation
(integer)
(operator)
(string
(quoted_string))))
Loading