test/parse_helper.rb in parser-1.3.1 vs test/parse_helper.rb in parser-1.3.2
- old
+ new
@@ -53,21 +53,21 @@
assert_equal end_pos, range.end_pos,
"(#{version}) end of #{what}"
end
# Use like this:
- # ```
+ # ~~~
# assert_parses(
# s(:send, s(:lit, 10), :+, s(:lit, 20))
# %q{10 + 20},
# %q{~~~~~~~ expression
# | ^ operator
# | ~~ expression (lit)
# },
# %w(1.8 1.9) # optional
# )
- # ```
+ # ~~~
def assert_parses(ast, code, source_maps='', versions=ALL_VERSIONS)
with_versions(code, versions) do |version, parser|
source_file = Parser::Source::Buffer.new('(assert_parses)')
source_file.source = code
@@ -101,16 +101,16 @@
end
end
end
# Use like this:
- # ```
+ # ~~~
# assert_diagnoses(
# [:warning, :ambiguous_prefix, { prefix: '*' }],
# %q{foo *bar},
# %q{ ^ location
# | ~~~ highlights (0)})
- # ```
+ # ~~~
def assert_diagnoses(diagnostic, code, source_maps='', versions=ALL_VERSIONS)
with_versions(code, versions) do |version, parser|
source_file = Parser::Source::Buffer.new('(assert_diagnoses)')
source_file.source = code