summaryrefslogtreecommitdiff
path: root/test/prism/fixtures
diff options
context:
space:
mode:
Diffstat (limited to 'test/prism/fixtures')
-rw-r--r--test/prism/fixtures/3.3-3.3/block_args_in_array_assignment.txt1
-rw-r--r--test/prism/fixtures/3.3-3.3/it.txt5
-rw-r--r--test/prism/fixtures/3.3-3.3/it_indirect_writes.txt23
-rw-r--r--test/prism/fixtures/3.3-3.3/it_read_and_assignment.txt1
-rw-r--r--test/prism/fixtures/3.3-3.3/it_with_ordinary_parameter.txt1
-rw-r--r--test/prism/fixtures/3.3-3.3/keyword_args_in_array_assignment.txt1
-rw-r--r--test/prism/fixtures/3.3-3.3/return_in_sclass.txt1
-rw-r--r--test/prism/fixtures/3.3-4.0/end_block_exit.txt11
-rw-r--r--test/prism/fixtures/3.3-4.0/void_value.txt29
-rw-r--r--test/prism/fixtures/3.4/circular_parameters.txt4
-rw-r--r--test/prism/fixtures/3.4/it.txt5
-rw-r--r--test/prism/fixtures/3.4/it_indirect_writes.txt23
-rw-r--r--test/prism/fixtures/3.4/it_read_and_assignment.txt1
-rw-r--r--test/prism/fixtures/4.0/endless_methods_command_call.txt11
-rw-r--r--test/prism/fixtures/4.0/leading_logical.txt16
-rw-r--r--test/prism/fixtures/4.1/noblock.txt4
-rw-r--r--test/prism/fixtures/4.1/trailing_comma_after_method_arguments.txt15
-rw-r--r--test/prism/fixtures/4.1/void_value.txt7
-rw-r--r--test/prism/fixtures/__END__.txt3
-rw-r--r--test/prism/fixtures/and_or_with_suffix.txt17
-rw-r--r--test/prism/fixtures/begin_rescue.txt6
-rw-r--r--test/prism/fixtures/blocks.txt8
-rw-r--r--test/prism/fixtures/bom_leading_space.txt1
-rw-r--r--test/prism/fixtures/bom_spaces.txt1
-rw-r--r--test/prism/fixtures/break.txt4
-rw-r--r--test/prism/fixtures/case_in_hash_key.txt6
-rw-r--r--test/prism/fixtures/case_in_in.txt4
-rw-r--r--test/prism/fixtures/character_literal.txt2
-rw-r--r--test/prism/fixtures/command_method_call_2.txt1
-rw-r--r--test/prism/fixtures/command_method_call_3.txt19
-rw-r--r--test/prism/fixtures/comment_single.txt1
-rw-r--r--test/prism/fixtures/defined.txt9
-rw-r--r--test/prism/fixtures/dstring.txt13
-rw-r--r--test/prism/fixtures/dsym_str.txt3
-rw-r--r--test/prism/fixtures/encoding_binary.txt9
-rw-r--r--test/prism/fixtures/encoding_euc_jp.txt6
-rw-r--r--test/prism/fixtures/endless_method_as_default_arg.txt11
-rw-r--r--test/prism/fixtures/endless_methods.txt6
-rw-r--r--test/prism/fixtures/escaped_newline_with_trailing_content.txt2
-rw-r--r--test/prism/fixtures/heredoc_dedent_line_continuation.txt5
-rw-r--r--test/prism/fixtures/heredoc_percent_q_newline_delimiter.txt22
-rw-r--r--test/prism/fixtures/heredocs_with_fake_newlines.txt55
-rw-r--r--test/prism/fixtures/it_assignment.txt1
-rw-r--r--test/prism/fixtures/keyword_method_names.txt9
-rw-r--r--test/prism/fixtures/lambda.txt16
-rw-r--r--test/prism/fixtures/methods.txt7
-rw-r--r--test/prism/fixtures/next.txt4
-rw-r--r--test/prism/fixtures/non_void_value.txt31
-rw-r--r--test/prism/fixtures/patterns.txt20
-rw-r--r--test/prism/fixtures/range_beginless.txt5
-rw-r--r--test/prism/fixtures/ranges.txt2
-rw-r--r--test/prism/fixtures/regex.txt10
-rw-r--r--test/prism/fixtures/regex_escape_encoding.txt3
-rw-r--r--test/prism/fixtures/regex_with_fake_newlines.txt41
-rw-r--r--test/prism/fixtures/rescue.txt4
-rw-r--r--test/prism/fixtures/rescue_modifier.txt7
-rw-r--r--test/prism/fixtures/return.txt3
-rw-r--r--test/prism/fixtures/string_concatination_frozen_false.txt5
-rw-r--r--test/prism/fixtures/string_concatination_frozen_true.txt5
-rw-r--r--test/prism/fixtures/strings.txt80
-rw-r--r--test/prism/fixtures/symbols.txt11
-rw-r--r--test/prism/fixtures/unary_method_calls.txt8
-rw-r--r--test/prism/fixtures/variables.txt2
-rw-r--r--test/prism/fixtures/whitequark/LICENSE3
-rw-r--r--test/prism/fixtures/whitequark/arg_combinations.txt29
-rw-r--r--test/prism/fixtures/whitequark/block_arg_combinations.txt57
-rw-r--r--test/prism/fixtures/whitequark/block_kwarg.txt1
-rw-r--r--test/prism/fixtures/whitequark/block_kwarg_combinations.txt5
-rw-r--r--test/prism/fixtures/whitequark/emit_arg_inside_procarg0_legacy.txt1
-rw-r--r--test/prism/fixtures/whitequark/find_pattern.txt7
-rw-r--r--test/prism/fixtures/whitequark/kwarg_combinations.txt7
-rw-r--r--test/prism/fixtures/whitequark/kwarg_no_paren.txt5
-rw-r--r--test/prism/fixtures/whitequark/lvar_injecting_match.txt2
-rw-r--r--test/prism/fixtures/whitequark/marg_combinations.txt19
-rw-r--r--test/prism/fixtures/whitequark/multiple_args_with_trailing_comma.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_const_pattern.txt11
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_constants.txt5
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_explicit_array_match.txt19
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_expr_in_paren.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_hash.txt48
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_if_unless_modifiers.txt3
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_implicit_array_match.txt15
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_keyword_variable.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_lambda.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_match_alt.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_match_as.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_nil_pattern.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_no_body.txt1
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_ranges.txt11
-rw-r--r--test/prism/fixtures/whitequark/pattern_matching_single_match.txt1
-rw-r--r--test/prism/fixtures/whitequark/pin_expr.txt14
-rw-r--r--test/prism/fixtures/whitequark/procarg0_legacy.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_18878.txt1
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_19281.txt7
-rw-r--r--test/prism/fixtures/whitequark/ruby_bug_19539.txt9
-rw-r--r--test/prism/fixtures/write_command_operator.txt3
-rw-r--r--test/prism/fixtures/xstring.txt8
97 files changed, 929 insertions, 18 deletions
diff --git a/test/prism/fixtures/3.3-3.3/block_args_in_array_assignment.txt b/test/prism/fixtures/3.3-3.3/block_args_in_array_assignment.txt
new file mode 100644
index 0000000000..6d6b052681
--- /dev/null
+++ b/test/prism/fixtures/3.3-3.3/block_args_in_array_assignment.txt
@@ -0,0 +1 @@
+matrix[5, &block] = 8
diff --git a/test/prism/fixtures/3.3-3.3/it.txt b/test/prism/fixtures/3.3-3.3/it.txt
new file mode 100644
index 0000000000..5410b01e71
--- /dev/null
+++ b/test/prism/fixtures/3.3-3.3/it.txt
@@ -0,0 +1,5 @@
+x do
+ it
+end
+
+-> { it }
diff --git a/test/prism/fixtures/3.3-3.3/it_indirect_writes.txt b/test/prism/fixtures/3.3-3.3/it_indirect_writes.txt
new file mode 100644
index 0000000000..bb87e9483e
--- /dev/null
+++ b/test/prism/fixtures/3.3-3.3/it_indirect_writes.txt
@@ -0,0 +1,23 @@
+tap { it += 1 }
+
+tap { it ||= 1 }
+
+tap { it &&= 1 }
+
+tap { it; it += 1 }
+
+tap { it; it ||= 1 }
+
+tap { it; it &&= 1 }
+
+tap { it += 1; it }
+
+tap { it ||= 1; it }
+
+tap { it &&= 1; it }
+
+tap { it; it += 1; it }
+
+tap { it; it ||= 1; it }
+
+tap { it; it &&= 1; it }
diff --git a/test/prism/fixtures/3.3-3.3/it_read_and_assignment.txt b/test/prism/fixtures/3.3-3.3/it_read_and_assignment.txt
new file mode 100644
index 0000000000..2cceeb2a54
--- /dev/null
+++ b/test/prism/fixtures/3.3-3.3/it_read_and_assignment.txt
@@ -0,0 +1 @@
+42.tap { p it; it = it; p it }
diff --git a/test/prism/fixtures/3.3-3.3/it_with_ordinary_parameter.txt b/test/prism/fixtures/3.3-3.3/it_with_ordinary_parameter.txt
new file mode 100644
index 0000000000..178b641e6b
--- /dev/null
+++ b/test/prism/fixtures/3.3-3.3/it_with_ordinary_parameter.txt
@@ -0,0 +1 @@
+proc { || it }
diff --git a/test/prism/fixtures/3.3-3.3/keyword_args_in_array_assignment.txt b/test/prism/fixtures/3.3-3.3/keyword_args_in_array_assignment.txt
new file mode 100644
index 0000000000..88016c2afe
--- /dev/null
+++ b/test/prism/fixtures/3.3-3.3/keyword_args_in_array_assignment.txt
@@ -0,0 +1 @@
+matrix[5, axis: :y] = 8
diff --git a/test/prism/fixtures/3.3-3.3/return_in_sclass.txt b/test/prism/fixtures/3.3-3.3/return_in_sclass.txt
new file mode 100644
index 0000000000..f1fde5771a
--- /dev/null
+++ b/test/prism/fixtures/3.3-3.3/return_in_sclass.txt
@@ -0,0 +1 @@
+class << A; return; end
diff --git a/test/prism/fixtures/3.3-4.0/end_block_exit.txt b/test/prism/fixtures/3.3-4.0/end_block_exit.txt
new file mode 100644
index 0000000000..8ebf0d6369
--- /dev/null
+++ b/test/prism/fixtures/3.3-4.0/end_block_exit.txt
@@ -0,0 +1,11 @@
+END {
+ return
+}
+
+END {
+ break
+}
+
+END {
+ next
+}
diff --git a/test/prism/fixtures/3.3-4.0/void_value.txt b/test/prism/fixtures/3.3-4.0/void_value.txt
new file mode 100644
index 0000000000..bfb8eff09c
--- /dev/null
+++ b/test/prism/fixtures/3.3-4.0/void_value.txt
@@ -0,0 +1,29 @@
+x = begin
+ foo
+rescue
+ return
+else
+ return
+end
+
+x = case
+ when 1 then return
+ else return
+end
+
+x = case 1
+ in 2 then return
+ else return
+end
+
+x = begin
+ return
+ "NG"
+end
+
+x = if rand < 0.5
+ return
+ "NG"
+else
+ return
+end
diff --git a/test/prism/fixtures/3.4/circular_parameters.txt b/test/prism/fixtures/3.4/circular_parameters.txt
new file mode 100644
index 0000000000..11537023ad
--- /dev/null
+++ b/test/prism/fixtures/3.4/circular_parameters.txt
@@ -0,0 +1,4 @@
+def foo(bar = bar) = 42
+def foo(bar: bar) = 42
+proc { |foo = foo| }
+proc { |foo: foo| }
diff --git a/test/prism/fixtures/3.4/it.txt b/test/prism/fixtures/3.4/it.txt
new file mode 100644
index 0000000000..5410b01e71
--- /dev/null
+++ b/test/prism/fixtures/3.4/it.txt
@@ -0,0 +1,5 @@
+x do
+ it
+end
+
+-> { it }
diff --git a/test/prism/fixtures/3.4/it_indirect_writes.txt b/test/prism/fixtures/3.4/it_indirect_writes.txt
new file mode 100644
index 0000000000..bb87e9483e
--- /dev/null
+++ b/test/prism/fixtures/3.4/it_indirect_writes.txt
@@ -0,0 +1,23 @@
+tap { it += 1 }
+
+tap { it ||= 1 }
+
+tap { it &&= 1 }
+
+tap { it; it += 1 }
+
+tap { it; it ||= 1 }
+
+tap { it; it &&= 1 }
+
+tap { it += 1; it }
+
+tap { it ||= 1; it }
+
+tap { it &&= 1; it }
+
+tap { it; it += 1; it }
+
+tap { it; it ||= 1; it }
+
+tap { it; it &&= 1; it }
diff --git a/test/prism/fixtures/3.4/it_read_and_assignment.txt b/test/prism/fixtures/3.4/it_read_and_assignment.txt
new file mode 100644
index 0000000000..2cceeb2a54
--- /dev/null
+++ b/test/prism/fixtures/3.4/it_read_and_assignment.txt
@@ -0,0 +1 @@
+42.tap { p it; it = it; p it }
diff --git a/test/prism/fixtures/4.0/endless_methods_command_call.txt b/test/prism/fixtures/4.0/endless_methods_command_call.txt
new file mode 100644
index 0000000000..146a6ee579
--- /dev/null
+++ b/test/prism/fixtures/4.0/endless_methods_command_call.txt
@@ -0,0 +1,11 @@
+private def foo = puts "Hello"
+private def foo = puts "Hello", "World"
+private def foo = puts "Hello" do expr end
+private def foo() = puts "Hello"
+private def foo(x) = puts x
+private def obj.foo = puts "Hello"
+private def obj.foo() = puts "Hello"
+private def obj.foo(x) = puts x
+
+private def foo = bar baz
+private def foo = bar baz do expr end
diff --git a/test/prism/fixtures/4.0/leading_logical.txt b/test/prism/fixtures/4.0/leading_logical.txt
new file mode 100644
index 0000000000..ee87e00d4f
--- /dev/null
+++ b/test/prism/fixtures/4.0/leading_logical.txt
@@ -0,0 +1,16 @@
+1
+&& 2
+&& 3
+
+1
+|| 2
+|| 3
+
+1
+and 2
+and 3
+
+1
+or 2
+or 3
+
diff --git a/test/prism/fixtures/4.1/noblock.txt b/test/prism/fixtures/4.1/noblock.txt
new file mode 100644
index 0000000000..2395393e22
--- /dev/null
+++ b/test/prism/fixtures/4.1/noblock.txt
@@ -0,0 +1,4 @@
+def foo(&nil)
+end
+
+-> (&nil) {}
diff --git a/test/prism/fixtures/4.1/trailing_comma_after_method_arguments.txt b/test/prism/fixtures/4.1/trailing_comma_after_method_arguments.txt
new file mode 100644
index 0000000000..ef1385d973
--- /dev/null
+++ b/test/prism/fixtures/4.1/trailing_comma_after_method_arguments.txt
@@ -0,0 +1,15 @@
+def foo(a,b,c,);end
+
+def foo(a,b,*c,);end
+
+def foo(a,b,*,);end
+
+def foo(a,b,**c,);end
+
+def foo(a,b,**,);end
+
+def foo(
+ a,
+ b,
+ c,
+);end
diff --git a/test/prism/fixtures/4.1/void_value.txt b/test/prism/fixtures/4.1/void_value.txt
new file mode 100644
index 0000000000..915112d623
--- /dev/null
+++ b/test/prism/fixtures/4.1/void_value.txt
@@ -0,0 +1,7 @@
+x = begin
+ return
+rescue
+ "OK"
+else
+ return
+end
diff --git a/test/prism/fixtures/__END__.txt b/test/prism/fixtures/__END__.txt
new file mode 100644
index 0000000000..c0f4f28004
--- /dev/null
+++ b/test/prism/fixtures/__END__.txt
@@ -0,0 +1,3 @@
+foo
+__END__
+Available in DATA constant
diff --git a/test/prism/fixtures/and_or_with_suffix.txt b/test/prism/fixtures/and_or_with_suffix.txt
new file mode 100644
index 0000000000..59ee4d0b88
--- /dev/null
+++ b/test/prism/fixtures/and_or_with_suffix.txt
@@ -0,0 +1,17 @@
+foo
+and?
+
+foo
+or?
+
+foo
+and!
+
+foo
+or!
+
+foo
+andbar
+
+foo
+orbar
diff --git a/test/prism/fixtures/begin_rescue.txt b/test/prism/fixtures/begin_rescue.txt
index 0a56fbef9f..790574f4ff 100644
--- a/test/prism/fixtures/begin_rescue.txt
+++ b/test/prism/fixtures/begin_rescue.txt
@@ -2,6 +2,12 @@ begin; a; rescue; b; else; c; end
begin; a; rescue; b; else; c; ensure; d; end
+begin; rescue ; end
+
+begin; rescue ; ensure ; end
+
+begin; rescue ; else ; end
+
begin
a
end
diff --git a/test/prism/fixtures/blocks.txt b/test/prism/fixtures/blocks.txt
index e33d95c150..51ec84950c 100644
--- a/test/prism/fixtures/blocks.txt
+++ b/test/prism/fixtures/blocks.txt
@@ -52,3 +52,11 @@ foo lambda { |
}
foo do |bar,| end
+
+foo bar baz, qux do end
+
+foo.bar baz do end
+
+foo.bar baz do end.qux quux do end
+
+foo bar, baz do |x| x end
diff --git a/test/prism/fixtures/bom_leading_space.txt b/test/prism/fixtures/bom_leading_space.txt
new file mode 100644
index 0000000000..48d3ee50ea
--- /dev/null
+++ b/test/prism/fixtures/bom_leading_space.txt
@@ -0,0 +1 @@
+ p (42)
diff --git a/test/prism/fixtures/bom_spaces.txt b/test/prism/fixtures/bom_spaces.txt
new file mode 100644
index 0000000000..c18ad4c21a
--- /dev/null
+++ b/test/prism/fixtures/bom_spaces.txt
@@ -0,0 +1 @@
+p ( 42 )
diff --git a/test/prism/fixtures/break.txt b/test/prism/fixtures/break.txt
index 5532322c5c..d823f866df 100644
--- a/test/prism/fixtures/break.txt
+++ b/test/prism/fixtures/break.txt
@@ -20,6 +20,10 @@ tap { break() }
tap { break(1) }
+tap { (break 1) }
+
+tap { foo && (break 1) }
+
foo { break 42 } == 42
foo { |a| break } == 42
diff --git a/test/prism/fixtures/case_in_hash_key.txt b/test/prism/fixtures/case_in_hash_key.txt
new file mode 100644
index 0000000000..75ac8a846f
--- /dev/null
+++ b/test/prism/fixtures/case_in_hash_key.txt
@@ -0,0 +1,6 @@
+case 1
+in 2
+ A.print message:
+in 3
+ A.print message:
+end
diff --git a/test/prism/fixtures/case_in_in.txt b/test/prism/fixtures/case_in_in.txt
new file mode 100644
index 0000000000..a5f9e4ec41
--- /dev/null
+++ b/test/prism/fixtures/case_in_in.txt
@@ -0,0 +1,4 @@
+case args
+in [event]
+ context.event in ^event
+end
diff --git a/test/prism/fixtures/character_literal.txt b/test/prism/fixtures/character_literal.txt
new file mode 100644
index 0000000000..920332123f
--- /dev/null
+++ b/test/prism/fixtures/character_literal.txt
@@ -0,0 +1,2 @@
+# encoding: Windows-31J
+p ?\u3042""
diff --git a/test/prism/fixtures/command_method_call_2.txt b/test/prism/fixtures/command_method_call_2.txt
new file mode 100644
index 0000000000..8bd40cff9e
--- /dev/null
+++ b/test/prism/fixtures/command_method_call_2.txt
@@ -0,0 +1 @@
+foo(bar baz, bat)
diff --git a/test/prism/fixtures/command_method_call_3.txt b/test/prism/fixtures/command_method_call_3.txt
new file mode 100644
index 0000000000..6de0446aa9
--- /dev/null
+++ b/test/prism/fixtures/command_method_call_3.txt
@@ -0,0 +1,19 @@
+foo(bar 1, key => '2')
+
+foo(bar 1, KEY => '2')
+
+foo(bar 1, :key => '2')
+
+foo(bar 1, { baz: :bat } => '2')
+
+foo bar - %i[baz] => '2'
+
+foo(bar {} => '2')
+
+foo(bar baz {} => '2')
+
+foo(bar do end => '2')
+
+foo(1, bar {} => '2')
+
+foo(1, bar do end => '2')
diff --git a/test/prism/fixtures/comment_single.txt b/test/prism/fixtures/comment_single.txt
new file mode 100644
index 0000000000..72037a6ea1
--- /dev/null
+++ b/test/prism/fixtures/comment_single.txt
@@ -0,0 +1 @@
+foo # Bar \ No newline at end of file
diff --git a/test/prism/fixtures/defined.txt b/test/prism/fixtures/defined.txt
index 247fa94e3a..09fc0a29e7 100644
--- a/test/prism/fixtures/defined.txt
+++ b/test/prism/fixtures/defined.txt
@@ -8,3 +8,12 @@ defined? 1
defined?("foo"
)
+
+defined?
+1
+
+defined?
+(1)
+
+defined?
+()
diff --git a/test/prism/fixtures/dstring.txt b/test/prism/fixtures/dstring.txt
index 085e0c6852..ef698d8fe9 100644
--- a/test/prism/fixtures/dstring.txt
+++ b/test/prism/fixtures/dstring.txt
@@ -27,3 +27,16 @@ foo\\\\
"
foo\\\\\
"
+
+"
+foo\
+b\nar
+#{}
+"
+
+"foo
+\n#{}bar\n\n#{}
+a\nb\n#{}\nc\n"
+
+"
+’"
diff --git a/test/prism/fixtures/dsym_str.txt b/test/prism/fixtures/dsym_str.txt
index ee68dde88d..0af0a8ddaf 100644
--- a/test/prism/fixtures/dsym_str.txt
+++ b/test/prism/fixtures/dsym_str.txt
@@ -1,2 +1,5 @@
:"foo
bar"
+
+:"
+’"
diff --git a/test/prism/fixtures/encoding_binary.txt b/test/prism/fixtures/encoding_binary.txt
new file mode 100644
index 0000000000..f3dfc85abd
--- /dev/null
+++ b/test/prism/fixtures/encoding_binary.txt
@@ -0,0 +1,9 @@
+# encoding: binary
+
+"\xcd"
+
+:"\xcd"
+
+/#{"\xcd"}/
+
+%W[\xC0]
diff --git a/test/prism/fixtures/encoding_euc_jp.txt b/test/prism/fixtures/encoding_euc_jp.txt
new file mode 100644
index 0000000000..bbee76eae5
--- /dev/null
+++ b/test/prism/fixtures/encoding_euc_jp.txt
@@ -0,0 +1,6 @@
+# encoding: euc-jp
+
+# \x8E indicates a double-byte character, \x01 is not a valid second byte in euc-jp
+"\x8E\x01"
+
+%W["\x8E\x01"]
diff --git a/test/prism/fixtures/endless_method_as_default_arg.txt b/test/prism/fixtures/endless_method_as_default_arg.txt
new file mode 100644
index 0000000000..0063d9a8fa
--- /dev/null
+++ b/test/prism/fixtures/endless_method_as_default_arg.txt
@@ -0,0 +1,11 @@
+def foo(a = def f = 1); end
+
+def foo(a = def f = 1, b); end
+
+def foo(b, a = def f = 1); end
+
+def foo(a: def f = 1); end
+
+def foo(a = def f = 1+2); end
+
+->(a = def f = 1) {}
diff --git a/test/prism/fixtures/endless_methods.txt b/test/prism/fixtures/endless_methods.txt
index 8c2f2a30cc..6e0488a5ee 100644
--- a/test/prism/fixtures/endless_methods.txt
+++ b/test/prism/fixtures/endless_methods.txt
@@ -3,3 +3,9 @@ def foo = 1
def bar = A ""
def method = 1 + 2 + 3
+
+x = def f = p 1
+
+def foo = bar baz
+
+def foo = bar(baz)
diff --git a/test/prism/fixtures/escaped_newline_with_trailing_content.txt b/test/prism/fixtures/escaped_newline_with_trailing_content.txt
new file mode 100644
index 0000000000..fe947a3f10
--- /dev/null
+++ b/test/prism/fixtures/escaped_newline_with_trailing_content.txt
@@ -0,0 +1,2 @@
+"A
+B\nCC"
diff --git a/test/prism/fixtures/heredoc_dedent_line_continuation.txt b/test/prism/fixtures/heredoc_dedent_line_continuation.txt
new file mode 100644
index 0000000000..661db490c7
--- /dev/null
+++ b/test/prism/fixtures/heredoc_dedent_line_continuation.txt
@@ -0,0 +1,5 @@
+<<~FOO
+ foo\
+ \
+ bar
+FOO
diff --git a/test/prism/fixtures/heredoc_percent_q_newline_delimiter.txt b/test/prism/fixtures/heredoc_percent_q_newline_delimiter.txt
new file mode 100644
index 0000000000..dbfa0bf4b4
--- /dev/null
+++ b/test/prism/fixtures/heredoc_percent_q_newline_delimiter.txt
@@ -0,0 +1,22 @@
+%Q
+#{<<B}
+B
+
+%
+#{<<B}
+B
+
+<<A; %Q
+A
+#{<<B}
+B
+
+<<A; %
+A
+#{<<B}
+B
+
+# \r\n
+%Q
+#{<<B}
+B
diff --git a/test/prism/fixtures/heredocs_with_fake_newlines.txt b/test/prism/fixtures/heredocs_with_fake_newlines.txt
new file mode 100644
index 0000000000..887b7ab5e7
--- /dev/null
+++ b/test/prism/fixtures/heredocs_with_fake_newlines.txt
@@ -0,0 +1,55 @@
+<<-RUBY
+ \n
+ \n
+ exit
+ \\n
+ \n\n\n\n
+ argh
+ \\
+ \\\
+ foo\nbar
+ \f
+ ok
+RUBY
+
+<<~RUBY
+ \n
+ \n
+ exit
+ \\n
+ \n\n\n\n
+ argh
+ \\
+ \\\
+ foo\nbar
+ \f
+ ok
+RUBY
+
+<<~RUBY
+ #{123}\n
+ \n
+ exit
+ \\#{123}n
+ \n#{123}\n\n\n
+ argh
+ \\#{123}baz
+ \\\
+ foo\nbar
+ \f
+ ok
+RUBY
+
+<<'RUBY'
+ \n
+ \n
+ exit
+ \n
+ \n\n\n\n
+ argh
+ \
+ \
+ foo\nbar
+ \f
+ ok
+RUBY
diff --git a/test/prism/fixtures/it_assignment.txt b/test/prism/fixtures/it_assignment.txt
new file mode 100644
index 0000000000..523b0ffe1e
--- /dev/null
+++ b/test/prism/fixtures/it_assignment.txt
@@ -0,0 +1 @@
+42.tap { it = it; p it }
diff --git a/test/prism/fixtures/keyword_method_names.txt b/test/prism/fixtures/keyword_method_names.txt
index 9154469441..d3b6eac537 100644
--- a/test/prism/fixtures/keyword_method_names.txt
+++ b/test/prism/fixtures/keyword_method_names.txt
@@ -12,18 +12,9 @@ end
def m(a, **nil)
end
-def __ENCODING__.a
-end
-
%{abc}
%"abc"
-def __FILE__.a
-end
-
-def __LINE__.a
-end
-
def nil::a
end
diff --git a/test/prism/fixtures/lambda.txt b/test/prism/fixtures/lambda.txt
index 5c21eafb24..8d67b4dd79 100644
--- a/test/prism/fixtures/lambda.txt
+++ b/test/prism/fixtures/lambda.txt
@@ -9,3 +9,19 @@
-> foo = bar do end
-> foo: bar do end
+
+def foo(*, **)
+ ->() { bar(*, **) }
+end
+
+p{|a:
+b|}
+
+->(a:
+b){}
+
+->a:
+b{}
+
+->a:
+{}
diff --git a/test/prism/fixtures/methods.txt b/test/prism/fixtures/methods.txt
index 4bfd976eda..eb0a5ca3dc 100644
--- a/test/prism/fixtures/methods.txt
+++ b/test/prism/fixtures/methods.txt
@@ -109,6 +109,8 @@ def foo = 123
def a(*); b(*); end
+def a(*, **); b { c(*, **) }; end
+
def a(...); b(...); end
def a(...); b(1, 2, ...); end
@@ -181,3 +183,8 @@ end
def foo(bar = (def baz(bar) = bar; 1)) = 2
def (class Foo; end).foo(bar = 1) = 2
+
+module Foo
+ def clone(opts = nil || (return self))
+ end
+end
diff --git a/test/prism/fixtures/next.txt b/test/prism/fixtures/next.txt
index 2ef14c6304..0d2d6a11f5 100644
--- a/test/prism/fixtures/next.txt
+++ b/test/prism/fixtures/next.txt
@@ -22,3 +22,7 @@ tap { next
tap { next() }
tap { next(1) }
+
+tap { (next 1) }
+
+tap { foo && (next 1) }
diff --git a/test/prism/fixtures/non_void_value.txt b/test/prism/fixtures/non_void_value.txt
new file mode 100644
index 0000000000..388e9f2574
--- /dev/null
+++ b/test/prism/fixtures/non_void_value.txt
@@ -0,0 +1,31 @@
+x = begin
+ return if true
+ "conditional"
+end
+
+x = if rand < 0.5
+ return
+ "else is nil"
+end
+
+x = if true
+ return if true
+ "conditional"
+else
+ return
+end
+
+x = if true
+ return if true
+else
+ return if true
+ "conditional"
+end
+
+x = case
+ when 1
+ return if true
+ "conditional"
+ else
+ return
+end
diff --git a/test/prism/fixtures/patterns.txt b/test/prism/fixtures/patterns.txt
index 29f8b4cf80..449dac619b 100644
--- a/test/prism/fixtures/patterns.txt
+++ b/test/prism/fixtures/patterns.txt
@@ -87,10 +87,7 @@ foo => *bar, baz, qux
foo => bar, *baz, qux
foo => bar, baz, *qux
foo => *bar, baz, *qux
-
-foo => bar,
-
-; # end the previous pattern for ParseTest#test_filepath_patterns.txt which parses the whole file at once
+foo => bar,;
foo => []
foo => [[[[[]]]]]
@@ -127,10 +124,7 @@ foo in __FILE__
foo in __LINE__
foo in __ENCODING__
foo in -> { bar }
-
-foo in bar,
-
-; # end the previous pattern for ParseTest#test_filepath_patterns.txt which parses the whole file at once
+foo in bar,;
case foo; in bar then end
case foo; in 1 then end
@@ -218,3 +212,13 @@ foo => Object[{x:}]
case (); in [_a, _a]; end
case (); in [{a:1}, {a:2}]; end
+a => ^({'a' => 'b'})
+
+a in b, and c
+a in b, or c
+(a in b,) and c
+(a in b,) or c
+
+x => ^([*a.x])
+x => ^([**a.x])
+x => ^({ a: })
diff --git a/test/prism/fixtures/range_beginless.txt b/test/prism/fixtures/range_beginless.txt
new file mode 100644
index 0000000000..a55b9b57e7
--- /dev/null
+++ b/test/prism/fixtures/range_beginless.txt
@@ -0,0 +1,5 @@
+def f(x = ...?a); end
+
+def f(x: ...?a); end
+
+def f() ...:a; end
diff --git a/test/prism/fixtures/ranges.txt b/test/prism/fixtures/ranges.txt
index e2e4136ae9..87eac6d241 100644
--- a/test/prism/fixtures/ranges.txt
+++ b/test/prism/fixtures/ranges.txt
@@ -2,6 +2,8 @@
(..2)
+foo ((1..1))
+
1...2
foo[...2]
diff --git a/test/prism/fixtures/regex.txt b/test/prism/fixtures/regex.txt
index 4623733f58..712bfc081a 100644
--- a/test/prism/fixtures/regex.txt
+++ b/test/prism/fixtures/regex.txt
@@ -46,3 +46,13 @@ tap { /(?<a>)/ =~ to_s }
def foo(nil:) = /(?<nil>)/ =~ ""
/(?-x:#)/x
+
+/a
+b\
+c\
+d\\\
+e\\
+f\
+/
+
+//
diff --git a/test/prism/fixtures/regex_escape_encoding.txt b/test/prism/fixtures/regex_escape_encoding.txt
new file mode 100644
index 0000000000..74e1647d67
--- /dev/null
+++ b/test/prism/fixtures/regex_escape_encoding.txt
@@ -0,0 +1,3 @@
+# encoding: US-ASCII
+str = "hello \xFC"
+str =~ /hello \u{fc}/
diff --git a/test/prism/fixtures/regex_with_fake_newlines.txt b/test/prism/fixtures/regex_with_fake_newlines.txt
new file mode 100644
index 0000000000..d92a2e4ade
--- /dev/null
+++ b/test/prism/fixtures/regex_with_fake_newlines.txt
@@ -0,0 +1,41 @@
+/
+ \n
+ \n
+ exit
+ \\n
+ \n\n\n\n
+ argh
+ \\
+ \\\
+ foo\nbar
+ \f
+ ok
+/
+
+%r{
+ \n
+ \n
+ exit
+ \\n
+ \n\n\n\n
+ argh
+ \\
+ \\\
+ foo\nbar
+ \f
+ ok
+}
+
+%r{
+ #{123}\n
+ \n
+ exit\\\
+ \\#{123}n
+ \n#{123}\n\n\n
+ argh\
+ \\#{123}baz\\
+ \\\
+ foo\nbar
+ \f
+ ok
+}
diff --git a/test/prism/fixtures/rescue.txt b/test/prism/fixtures/rescue.txt
index 99170fbe0f..f436463029 100644
--- a/test/prism/fixtures/rescue.txt
+++ b/test/prism/fixtures/rescue.txt
@@ -33,3 +33,7 @@ end
foo if bar rescue baz
z = x y rescue c d
+
+begin
+rescue => A[]
+end
diff --git a/test/prism/fixtures/rescue_modifier.txt b/test/prism/fixtures/rescue_modifier.txt
new file mode 100644
index 0000000000..def9e2dbed
--- /dev/null
+++ b/test/prism/fixtures/rescue_modifier.txt
@@ -0,0 +1,7 @@
+a rescue b if c
+
+a = b rescue c if d
+
+a, = b rescue c if d
+
+def a = b rescue c if d
diff --git a/test/prism/fixtures/return.txt b/test/prism/fixtures/return.txt
index a8b5b95fab..952fb80da8 100644
--- a/test/prism/fixtures/return.txt
+++ b/test/prism/fixtures/return.txt
@@ -22,3 +22,6 @@ return()
return(1)
+(return 1)
+
+foo && (return 1)
diff --git a/test/prism/fixtures/string_concatination_frozen_false.txt b/test/prism/fixtures/string_concatination_frozen_false.txt
new file mode 100644
index 0000000000..abe9301408
--- /dev/null
+++ b/test/prism/fixtures/string_concatination_frozen_false.txt
@@ -0,0 +1,5 @@
+# frozen_string_literal: false
+
+'foo' 'bar'
+
+'foo' 'bar' "baz#{bat}"
diff --git a/test/prism/fixtures/string_concatination_frozen_true.txt b/test/prism/fixtures/string_concatination_frozen_true.txt
new file mode 100644
index 0000000000..829777f0a7
--- /dev/null
+++ b/test/prism/fixtures/string_concatination_frozen_true.txt
@@ -0,0 +1,5 @@
+# frozen_string_literal: true
+
+'foo' 'bar'
+
+'foo' 'bar' "baz#{bat}"
diff --git a/test/prism/fixtures/strings.txt b/test/prism/fixtures/strings.txt
index 2ce8b738a3..1419f975b7 100644
--- a/test/prism/fixtures/strings.txt
+++ b/test/prism/fixtures/strings.txt
@@ -40,6 +40,15 @@
#
"bar"
+"
+foo\
+b\nar
+"
+
+"foo
+\nbar\n\n
+a\nb\n\nc\n"
+
%q{abc}
%s[abc]
@@ -64,6 +73,62 @@
%w[foo\ bar baz]
+%w[foo\ bar\\ baz\\\
+ bat]
+
+%W[#{foo}\
+bar
+baz #{bat}
+]
+
+%w(foo\n)
+
+%w(foo\
+)
+
+%w(foo \n)
+
+%W(foo\
+bar)
+
+%w[foo bar]
+
+%w[
+ a
+ b c
+ d
+]
+
+%w[
+ foo\nbar baz\n\n\
+ bat\n\\\n\foo
+]
+
+%W[
+ foo\nbar baz\n\n\
+ bat\n\\\n\foo
+]
+
+%w[foo\
+ bar
+ baz\\
+ bat
+ 1\n
+ 2
+ 3\\n
+]
+
+%W[foo\
+ bar
+ baz\\
+ bat
+ 1\n
+ 2
+ 3\\n
+]
+
+%W[f\u{006f 006f}]
+
%W[a b#{c}d e]
%W[a b c]
@@ -78,6 +143,11 @@
'\\ foo \\ bar'
+'foo\
+bar\\
+baz
+'
+
"#$foo"
"#@foo"
@@ -86,6 +156,10 @@
"\7 \43 \141"
+"ち\xE3\x81\xFF"
+
+"\777"
+
%[abc]
%(abc)
@@ -100,6 +174,12 @@
%Q{abc}
+%Q(\«)
+
+%q(\«)
+
%^#$^#
%@#@#
+
+"#{"#{B} C"} D"
diff --git a/test/prism/fixtures/symbols.txt b/test/prism/fixtures/symbols.txt
index 7563eb874f..34895b9e9f 100644
--- a/test/prism/fixtures/symbols.txt
+++ b/test/prism/fixtures/symbols.txt
@@ -4,6 +4,17 @@
:"abc#{1}"
+:"
+foo\
+b\nar
+"
+
+:"
+foo\
+b\nar
+#{}
+"
+
[:Υ, :ά, :ŗ, :ρ]
:-@
diff --git a/test/prism/fixtures/unary_method_calls.txt b/test/prism/fixtures/unary_method_calls.txt
new file mode 100644
index 0000000000..a8327d23cc
--- /dev/null
+++ b/test/prism/fixtures/unary_method_calls.txt
@@ -0,0 +1,8 @@
+42.~@
+42.!@
+
+-
+42
+
++
+42
diff --git a/test/prism/fixtures/variables.txt b/test/prism/fixtures/variables.txt
index 1545c30c80..4f4dc6f9c8 100644
--- a/test/prism/fixtures/variables.txt
+++ b/test/prism/fixtures/variables.txt
@@ -45,3 +45,5 @@ Foo = 1, 2
(a; b; c)
a, (b, c), d = []
+
+(a,), = []
diff --git a/test/prism/fixtures/whitequark/LICENSE b/test/prism/fixtures/whitequark/LICENSE
index 971310e3d6..43f9788985 100644
--- a/test/prism/fixtures/whitequark/LICENSE
+++ b/test/prism/fixtures/whitequark/LICENSE
@@ -1,4 +1,5 @@
-Copyright (c) 2013-2016 whitequark <whitequark@whitequark.org>
+Copyright (c) 2013-2024 parser project contributors
+Copyright (c) 2013-2016 Catherine <whitequark@whitequark.org>
Parts of the source are derived from ruby_parser:
Copyright (c) Ryan Davis, seattle.rb
diff --git a/test/prism/fixtures/whitequark/arg_combinations.txt b/test/prism/fixtures/whitequark/arg_combinations.txt
new file mode 100644
index 0000000000..801b1e47f4
--- /dev/null
+++ b/test/prism/fixtures/whitequark/arg_combinations.txt
@@ -0,0 +1,29 @@
+def f &b; end
+
+def f *r, &b; end
+
+def f *r, p, &b; end
+
+def f ; end
+
+def f a, &b; end
+
+def f a, *r, &b; end
+
+def f a, *r, p, &b; end
+
+def f a, o=1, &b; end
+
+def f a, o=1, *r, &b; end
+
+def f a, o=1, *r, p, &b; end
+
+def f a, o=1, p, &b; end
+
+def f o=1, &b; end
+
+def f o=1, *r, &b; end
+
+def f o=1, *r, p, &b; end
+
+def f o=1, p, &b; end
diff --git a/test/prism/fixtures/whitequark/block_arg_combinations.txt b/test/prism/fixtures/whitequark/block_arg_combinations.txt
new file mode 100644
index 0000000000..ccb9cfea56
--- /dev/null
+++ b/test/prism/fixtures/whitequark/block_arg_combinations.txt
@@ -0,0 +1,57 @@
+f{ }
+
+f{ | | }
+
+f{ |&b| }
+
+f{ |*, &b| }
+
+f{ |*r, p, &b| }
+
+f{ |*s, &b| }
+
+f{ |*s| }
+
+f{ |*| }
+
+f{ |;
+a
+| }
+
+f{ |;a| }
+
+f{ |a, &b| }
+
+f{ |a, *, &b| }
+
+f{ |a, *r, p, &b| }
+
+f{ |a, *s, &b| }
+
+f{ |a, *s| }
+
+f{ |a, *| }
+
+f{ |a, c| }
+
+f{ |a, o=1, &b| }
+
+f{ |a, o=1, *r, p, &b| }
+
+f{ |a, o=1, o1=2, *r, &b| }
+
+f{ |a, o=1, p, &b| }
+
+f{ |a,| }
+
+f{ |a| }
+
+f{ |o=1, &b| }
+
+f{ |o=1, *r, &b| }
+
+f{ |o=1, *r, p, &b| }
+
+f{ |o=1, p, &b| }
+
+f{ || }
diff --git a/test/prism/fixtures/whitequark/block_kwarg.txt b/test/prism/fixtures/whitequark/block_kwarg.txt
new file mode 100644
index 0000000000..9f1283371f
--- /dev/null
+++ b/test/prism/fixtures/whitequark/block_kwarg.txt
@@ -0,0 +1 @@
+f{ |foo:| }
diff --git a/test/prism/fixtures/whitequark/block_kwarg_combinations.txt b/test/prism/fixtures/whitequark/block_kwarg_combinations.txt
new file mode 100644
index 0000000000..3dbb961777
--- /dev/null
+++ b/test/prism/fixtures/whitequark/block_kwarg_combinations.txt
@@ -0,0 +1,5 @@
+f{ |**baz, &b| }
+
+f{ |foo: 1, &b| }
+
+f{ |foo: 1, bar: 2, **baz, &b| }
diff --git a/test/prism/fixtures/whitequark/emit_arg_inside_procarg0_legacy.txt b/test/prism/fixtures/whitequark/emit_arg_inside_procarg0_legacy.txt
new file mode 100644
index 0000000000..a985f15b6e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/emit_arg_inside_procarg0_legacy.txt
@@ -0,0 +1 @@
+f{ |a| }
diff --git a/test/prism/fixtures/whitequark/find_pattern.txt b/test/prism/fixtures/whitequark/find_pattern.txt
new file mode 100644
index 0000000000..fb8999ae28
--- /dev/null
+++ b/test/prism/fixtures/whitequark/find_pattern.txt
@@ -0,0 +1,7 @@
+case foo; in *, 42, * then true; end
+
+case foo; in Array[*, 1, *] then true; end
+
+case foo; in String(*, 1, *) then true; end
+
+case foo; in [*x, 1 => a, *y] then true; end
diff --git a/test/prism/fixtures/whitequark/kwarg_combinations.txt b/test/prism/fixtures/whitequark/kwarg_combinations.txt
new file mode 100644
index 0000000000..1bd792856e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwarg_combinations.txt
@@ -0,0 +1,7 @@
+def f (foo: 1, &b); end
+
+def f (foo: 1, bar: 2, **baz, &b); end
+
+def f **baz, &b; end
+
+def f *, **; end
diff --git a/test/prism/fixtures/whitequark/kwarg_no_paren.txt b/test/prism/fixtures/whitequark/kwarg_no_paren.txt
new file mode 100644
index 0000000000..cf29c273d0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/kwarg_no_paren.txt
@@ -0,0 +1,5 @@
+def f foo:
+; end
+
+def f foo: -1
+; end
diff --git a/test/prism/fixtures/whitequark/lvar_injecting_match.txt b/test/prism/fixtures/whitequark/lvar_injecting_match.txt
index ba814a1088..2d18c84b57 100644
--- a/test/prism/fixtures/whitequark/lvar_injecting_match.txt
+++ b/test/prism/fixtures/whitequark/lvar_injecting_match.txt
@@ -1 +1,3 @@
+/(?<a>a)/ =~ 'a'; /#{}(?<b>b)/ =~ 'b'; a; b
+
/(?<match>bar)/ =~ 'bar'; match
diff --git a/test/prism/fixtures/whitequark/marg_combinations.txt b/test/prism/fixtures/whitequark/marg_combinations.txt
new file mode 100644
index 0000000000..aff34dcb62
--- /dev/null
+++ b/test/prism/fixtures/whitequark/marg_combinations.txt
@@ -0,0 +1,19 @@
+def f (((a))); end
+
+def f ((*)); end
+
+def f ((*, p)); end
+
+def f ((*r)); end
+
+def f ((*r, p)); end
+
+def f ((a, *)); end
+
+def f ((a, *, p)); end
+
+def f ((a, *r)); end
+
+def f ((a, *r, p)); end
+
+def f ((a, a1)); end
diff --git a/test/prism/fixtures/whitequark/multiple_args_with_trailing_comma.txt b/test/prism/fixtures/whitequark/multiple_args_with_trailing_comma.txt
new file mode 100644
index 0000000000..b690738757
--- /dev/null
+++ b/test/prism/fixtures/whitequark/multiple_args_with_trailing_comma.txt
@@ -0,0 +1 @@
+f{ |a, b,| }
diff --git a/test/prism/fixtures/whitequark/pattern_matching_const_pattern.txt b/test/prism/fixtures/whitequark/pattern_matching_const_pattern.txt
new file mode 100644
index 0000000000..82821dbc83
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_const_pattern.txt
@@ -0,0 +1,11 @@
+case foo; in A() then true; end
+
+case foo; in A(1, 2) then true; end
+
+case foo; in A(x:) then true; end
+
+case foo; in A[1, 2] then true; end
+
+case foo; in A[] then true; end
+
+case foo; in A[x:] then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_constants.txt b/test/prism/fixtures/whitequark/pattern_matching_constants.txt
new file mode 100644
index 0000000000..aba764ff35
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_constants.txt
@@ -0,0 +1,5 @@
+case foo; in ::A then true; end
+
+case foo; in A then true; end
+
+case foo; in A::B then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_explicit_array_match.txt b/test/prism/fixtures/whitequark/pattern_matching_explicit_array_match.txt
new file mode 100644
index 0000000000..61e518d0fb
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_explicit_array_match.txt
@@ -0,0 +1,19 @@
+case foo; in [*, x] then true; end
+
+case foo; in [*x, y] then true; end
+
+case foo; in [x, *, y] then true; end
+
+case foo; in [x, *y, z] then true; end
+
+case foo; in [x, y, *] then true; end
+
+case foo; in [x, y, *z] then true; end
+
+case foo; in [x, y,] then true; end
+
+case foo; in [x, y] then true; end
+
+case foo; in [x,] then nil; end
+
+case foo; in [x] then nil; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_expr_in_paren.txt b/test/prism/fixtures/whitequark/pattern_matching_expr_in_paren.txt
new file mode 100644
index 0000000000..9b2e91b70d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_expr_in_paren.txt
@@ -0,0 +1 @@
+case foo; in (1) then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_hash.txt b/test/prism/fixtures/whitequark/pattern_matching_hash.txt
new file mode 100644
index 0000000000..b26f2c59dc
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_hash.txt
@@ -0,0 +1,48 @@
+case foo;
+ in a: {b:}, c:
+ p c
+ ; end
+
+case foo;
+ in {Foo: 42
+ }
+ false
+ ; end
+
+case foo;
+ in {a:
+ 2}
+ false
+ ; end
+
+case foo;
+ in {a:
+ }
+ true
+ ; end
+
+case foo;
+ in {a: 1
+ }
+ false
+ ; end
+
+case foo; in ** then true; end
+
+case foo; in **a then true; end
+
+case foo; in a: 1 then true; end
+
+case foo; in a: 1, _a:, ** then true; end
+
+case foo; in a: 1, b: 2 then true; end
+
+case foo; in a: then true; end
+
+case foo; in a:, b: then true; end
+
+case foo; in { a: 1 } then true; end
+
+case foo; in { a: 1, } then true; end
+
+case foo; in {} then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_if_unless_modifiers.txt b/test/prism/fixtures/whitequark/pattern_matching_if_unless_modifiers.txt
new file mode 100644
index 0000000000..05ca317355
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_if_unless_modifiers.txt
@@ -0,0 +1,3 @@
+case foo; in x if true; nil; end
+
+case foo; in x unless true; nil; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_implicit_array_match.txt b/test/prism/fixtures/whitequark/pattern_matching_implicit_array_match.txt
new file mode 100644
index 0000000000..360c5150a5
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_implicit_array_match.txt
@@ -0,0 +1,15 @@
+case foo; in * then nil; end
+
+case foo; in *x then nil; end
+
+case foo; in *x, y, z then nil; end
+
+case foo; in 1, "a", [], {} then nil; end
+
+case foo; in x, *y, z then nil; end
+
+case foo; in x, then nil; end
+
+case foo; in x, y then nil; end
+
+case foo; in x, y, then nil; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_keyword_variable.txt b/test/prism/fixtures/whitequark/pattern_matching_keyword_variable.txt
new file mode 100644
index 0000000000..83c7a06b09
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_keyword_variable.txt
@@ -0,0 +1 @@
+case foo; in self then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_lambda.txt b/test/prism/fixtures/whitequark/pattern_matching_lambda.txt
new file mode 100644
index 0000000000..eeccdc70e0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_lambda.txt
@@ -0,0 +1 @@
+case foo; in ->{ 42 } then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_match_alt.txt b/test/prism/fixtures/whitequark/pattern_matching_match_alt.txt
new file mode 100644
index 0000000000..6c6549916d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_match_alt.txt
@@ -0,0 +1 @@
+case foo; in 1 | 2 then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_match_as.txt b/test/prism/fixtures/whitequark/pattern_matching_match_as.txt
new file mode 100644
index 0000000000..2a105f9f36
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_match_as.txt
@@ -0,0 +1 @@
+case foo; in 1 => a then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_nil_pattern.txt b/test/prism/fixtures/whitequark/pattern_matching_nil_pattern.txt
new file mode 100644
index 0000000000..46dce94a2d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_nil_pattern.txt
@@ -0,0 +1 @@
+case foo; in **nil then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_no_body.txt b/test/prism/fixtures/whitequark/pattern_matching_no_body.txt
new file mode 100644
index 0000000000..73b471d352
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_no_body.txt
@@ -0,0 +1 @@
+case foo; in 1; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_ranges.txt b/test/prism/fixtures/whitequark/pattern_matching_ranges.txt
new file mode 100644
index 0000000000..7e603e77b0
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_ranges.txt
@@ -0,0 +1,11 @@
+case foo; in ...2 then true; end
+
+case foo; in ..2 then true; end
+
+case foo; in 1.. then true; end
+
+case foo; in 1... then true; end
+
+case foo; in 1...2 then true; end
+
+case foo; in 1..2 then true; end
diff --git a/test/prism/fixtures/whitequark/pattern_matching_single_match.txt b/test/prism/fixtures/whitequark/pattern_matching_single_match.txt
new file mode 100644
index 0000000000..c174376585
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pattern_matching_single_match.txt
@@ -0,0 +1 @@
+case foo; in x then x; end
diff --git a/test/prism/fixtures/whitequark/pin_expr.txt b/test/prism/fixtures/whitequark/pin_expr.txt
new file mode 100644
index 0000000000..a072c7c194
--- /dev/null
+++ b/test/prism/fixtures/whitequark/pin_expr.txt
@@ -0,0 +1,14 @@
+case foo; in ^$TestPatternMatching; end
+
+case foo; in ^(0+0) then nil; end
+
+case foo; in ^(1
+); end
+
+case foo; in ^(42) then nil; end
+
+case foo; in ^@@TestPatternMatching; end
+
+case foo; in ^@a; end
+
+case foo; in { foo: ^(42) } then nil; end
diff --git a/test/prism/fixtures/whitequark/procarg0_legacy.txt b/test/prism/fixtures/whitequark/procarg0_legacy.txt
new file mode 100644
index 0000000000..a985f15b6e
--- /dev/null
+++ b/test/prism/fixtures/whitequark/procarg0_legacy.txt
@@ -0,0 +1 @@
+f{ |a| }
diff --git a/test/prism/fixtures/whitequark/ruby_bug_18878.txt b/test/prism/fixtures/whitequark/ruby_bug_18878.txt
new file mode 100644
index 0000000000..583280c9e3
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_18878.txt
@@ -0,0 +1 @@
+Foo::Bar { |a| 42 }
diff --git a/test/prism/fixtures/whitequark/ruby_bug_19281.txt b/test/prism/fixtures/whitequark/ruby_bug_19281.txt
new file mode 100644
index 0000000000..cd154f9756
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_19281.txt
@@ -0,0 +1,7 @@
+a.b (1;2),(3),(4)
+
+a.b (;),(),()
+
+p (1;2),(3),(4)
+
+p (;),(),()
diff --git a/test/prism/fixtures/whitequark/ruby_bug_19539.txt b/test/prism/fixtures/whitequark/ruby_bug_19539.txt
new file mode 100644
index 0000000000..b2d052d94d
--- /dev/null
+++ b/test/prism/fixtures/whitequark/ruby_bug_19539.txt
@@ -0,0 +1,9 @@
+<<' FOO'
+[Bug #19539]
+ FOO
+
+
+<<-' FOO'
+[Bug #19539]
+ FOO
+
diff --git a/test/prism/fixtures/write_command_operator.txt b/test/prism/fixtures/write_command_operator.txt
new file mode 100644
index 0000000000..d719d24f87
--- /dev/null
+++ b/test/prism/fixtures/write_command_operator.txt
@@ -0,0 +1,3 @@
+foo = 123 | '456' or return
+
+foo = 123 | '456' in BAR
diff --git a/test/prism/fixtures/xstring.txt b/test/prism/fixtures/xstring.txt
index 7ec09468d8..465a14e84b 100644
--- a/test/prism/fixtures/xstring.txt
+++ b/test/prism/fixtures/xstring.txt
@@ -11,3 +11,11 @@
``
%x{}
+
+`
+foo\
+b\nar
+`
+
+`
+’`