diff options
| author | Kevin Newton <kddnewton@gmail.com> | 2024-10-07 13:47:04 -0400 |
|---|---|---|
| committer | git <svn-admin@ruby-lang.org> | 2024-10-07 17:57:36 +0000 |
| commit | 4cbd2ab9d462784ee44108e396177807e869ad23 (patch) | |
| tree | 06c776233aa4ba8d6c4c4eced4191e26aedb3c68 /test | |
| parent | 35711903f239e462da682929982f434ee45c2199 (diff) | |
[ruby/prism] Properly handle non-assoc operators
https://github.com/ruby/prism/commit/dbd5c929d6
Diffstat (limited to 'test')
| -rw-r--r-- | test/prism/errors/binary_range_with_left_unary_range.txt | 1 | ||||
| -rw-r--r-- | test/prism/errors/non_assoc_equality.txt | 6 | ||||
| -rw-r--r-- | test/prism/errors/range_and_bin_op.txt | 1 | ||||
| -rw-r--r-- | test/prism/errors/range_and_bin_op_2.txt | 1 |
4 files changed, 9 insertions, 0 deletions
diff --git a/test/prism/errors/binary_range_with_left_unary_range.txt b/test/prism/errors/binary_range_with_left_unary_range.txt index 37e41f3971..85cf55fb80 100644 --- a/test/prism/errors/binary_range_with_left_unary_range.txt +++ b/test/prism/errors/binary_range_with_left_unary_range.txt @@ -2,6 +2,7 @@ ^~ unexpected range operator; .. and ... are non-associative and cannot be chained ...1.. ^~ unexpected range operator; .. and ... are non-associative and cannot be chained + ^~ unexpected ..; .. is a non-associative operator ^~ unexpected .., expecting end-of-input ^~ unexpected .., ignoring it diff --git a/test/prism/errors/non_assoc_equality.txt b/test/prism/errors/non_assoc_equality.txt index 6ce8da88d6..9b3f137549 100644 --- a/test/prism/errors/non_assoc_equality.txt +++ b/test/prism/errors/non_assoc_equality.txt @@ -1,19 +1,25 @@ 1 == 2 == 3 + ^~ unexpected '=='; '==' is a non-associative operator ^~ unexpected '==', expecting end-of-input ^~ unexpected '==', ignoring it 1 != 2 != 3 + ^~ unexpected '!='; '!=' is a non-associative operator ^~ unexpected '!=', expecting end-of-input ^~ unexpected '!=', ignoring it 1 === 2 === 3 + ^~~ unexpected '==='; '===' is a non-associative operator ^~~ unexpected '===', expecting end-of-input ^~~ unexpected '===', ignoring it 1 =~ 2 =~ 3 + ^~ unexpected '=~'; '=~' is a non-associative operator ^~ unexpected '=~', expecting end-of-input ^~ unexpected '=~', ignoring it 1 !~ 2 !~ 3 + ^~ unexpected '!~'; '!~' is a non-associative operator ^~ unexpected '!~', expecting end-of-input ^~ unexpected '!~', ignoring it 1 <=> 2 <=> 3 + ^~~ unexpected '<=>'; '<=>' is a non-associative operator ^~~ unexpected '<=>', expecting end-of-input ^~~ unexpected '<=>', ignoring it diff --git a/test/prism/errors/range_and_bin_op.txt b/test/prism/errors/range_and_bin_op.txt index 4a7a396d0d..55928c409b 100644 --- a/test/prism/errors/range_and_bin_op.txt +++ b/test/prism/errors/range_and_bin_op.txt @@ -1,4 +1,5 @@ 1..2..3 + ^~ unexpected ..; .. is a non-associative operator ^~ unexpected .., expecting end-of-input ^~ unexpected .., ignoring it diff --git a/test/prism/errors/range_and_bin_op_2.txt b/test/prism/errors/range_and_bin_op_2.txt index f2a31dcf82..6ca91a26eb 100644 --- a/test/prism/errors/range_and_bin_op_2.txt +++ b/test/prism/errors/range_and_bin_op_2.txt @@ -1,4 +1,5 @@ 1..2.. + ^~ unexpected ..; .. is a non-associative operator ^~ unexpected .., expecting end-of-input ^~ unexpected .., ignoring it |
