Skip to content

Commit cd823d5

Browse files
committed
Update seattlerb/ruby_parser tests
1 parent b1492ec commit cd823d5

File tree

4 files changed

+13
-8
lines changed

4 files changed

+13
-8
lines changed

rakelib/seattlerb.rake

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,12 @@ namespace :seattlerb do
1313

1414
desc "Import the seattlerb tests"
1515
task import: ["tmp/seattlerb", "test/prism/fixtures/seattlerb"] do
16-
require "base64"
16+
require "bundler/inline"
17+
gemfile do
18+
source "https://rubygems.org"
19+
gem "minitest", require: "minitest/autorun"
20+
gem "ruby_parser"
21+
end
1722

1823
# These files are not valid Ruby
1924
known_failures = %w[
@@ -40,7 +45,7 @@ namespace :seattlerb do
4045
"d3RmX2lfaGF0ZV95b3U=\n",
4146
"d3Rm\n",
4247
"em9tZ19zb21ldGltZXNfaV9oYXRlX3RoaXNfcHJvamVjdA==\n"
43-
].map { Base64.decode64(_1) }
48+
].map { _1.unpack1("m") }
4449

4550
# The license is in the README
4651
cp "tmp/seattlerb/README.rdoc", "test/prism/fixtures/seattlerb/README.rdoc"

test/prism/fixtures/seattlerb/README.rdoc

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,15 @@ You can also use Ruby19Parser, Ruby18Parser, or RubyParser.for_current_ruby:
6565

6666
To add a new version:
6767

68-
* New parser should be generated from lib/ruby[3]_parser.yy.
69-
* Extend lib/ruby[3]_parser.yy with new class name.
68+
* New parser should be generated from lib/ruby_parser[23].yy.
69+
* Extend lib/ruby_parser[23].yy with new class name.
7070
* Add new version number to V2/V3 in Rakefile for rule creation.
7171
* Add new `ruby_parse "x.y.z"` line to Rakefile for rake compare (line ~300).
7272
* Require generated parser in lib/ruby_parser.rb.
7373
* Add new V## = ::Ruby##Parser; end to ruby_parser.rb (bottom of file).
7474
* Add empty TestRubyParserShared##Plus module and TestRubyParserV## to test/test_ruby_parser.rb.
7575
* Extend Manifest.txt with generated file names.
76-
* Add new version number to sexp_processor's pt_testcase.rb in all_versions
76+
* Add new version number to sexp_processor's pt_testcase.rb in all_versions.
7777

7878
Until all of these are done, you won't have a clean test run.
7979

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
1-
%q{ \
1+
%Q{ \
22
}

test/prism/snapshots/seattlerb/pct_Q_backslash_nl.txt

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)