Skip to content

Commit 377a7f1

Browse files
eregonandrykonchin
authored andcommitted
Cleanup parsing_spec.rb as the old parser it not there anymore
1 parent 6a7629a commit 377a7f1

File tree

1 file changed

+3
-11
lines changed

1 file changed

+3
-11
lines changed

spec/truffle/parsing/parsing_spec.rb

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@
4343
#
4444
# To regenerate fixture YAML files with actual AST run the following command:
4545
#
46-
# OVERWRITE_PARSING_RESULTS=true TRUFFLE_PARSING_USE_ORIGINAL_TRANSLATOR=true jt -q mspec spec/truffle/parsing/parsing_spec.rb && OVERWRITE_PARSING_RESULTS=true jt -q test spec/truffle/parsing/parsing_spec.rb
46+
# OVERWRITE_PARSING_RESULTS=true jt -q test spec/truffle/parsing/parsing_spec.rb
4747
#
48-
# To ensure that fixtures are valid and are passing both on the old and new translator, use:
48+
# To ensure that fixtures are valid and are passing on the new translator, use:
4949
#
50-
# TRUFFLE_PARSING_USE_ORIGINAL_TRANSLATOR=true jt -q mspec spec/truffle/parsing/parsing_spec.rb && jt -q test spec/truffle/parsing/parsing_spec.rb
50+
# jt -q test spec/truffle/parsing/parsing_spec.rb
5151
#
5252
# An approach with YAML.dump has some downsides:
5353
# - it adds a line `---` at a file beginning
@@ -57,7 +57,6 @@
5757
# So just replace AST in a YAML file using a regexp.
5858

5959
overwrite = ENV['OVERWRITE_PARSING_RESULTS'] == 'true'
60-
original_parser = ENV['TRUFFLE_PARSING_USE_ORIGINAL_TRANSLATOR'] == 'true'
6160
fixtures_glob = ENV['TRUFFLE_PARSING_GLOB']
6261

6362
describe "Parsing" do
@@ -102,13 +101,6 @@
102101
end
103102
else
104103
# actual test check
105-
106-
if original_parser
107-
# ignore flags attribute generated by JRuby parser as far as it's not accurate
108-
actual_ast.gsub!(/^\s+flags = \d+\n?/, "")
109-
expected_ast.gsub!(/^\s+flags = \d+\n?/, "")
110-
end
111-
112104
unless actual_ast == expected_ast
113105
$stderr.puts "\n#{filename}\nYARP AST:", Truffle::Debug.parse_ast(source_code)
114106
end

0 commit comments

Comments
 (0)