Skip to content

Commit

Permalink
remove outdated workaround in test suite for JRuby heredoc bug
Browse files Browse the repository at this point in the history
  • Loading branch information
mojavelinux committed Oct 24, 2022
1 parent 3d0c8ac commit 64f5261
Show file tree
Hide file tree
Showing 6 changed files with 91 additions and 181 deletions.
24 changes: 8 additions & 16 deletions test/blocks_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -1191,8 +1191,7 @@
end

test 'should strip leading and trailing blank lines when converting verbatim block' do
# NOTE cannot use single-quoted heredoc because of https://github.com/jruby/jruby/issues/4260
input = <<~EOS
input = <<~'EOS'
[subs=attributes+]
....
Expand Down Expand Up @@ -1227,8 +1226,7 @@
end

test 'should remove block indent if indent attribute is 0' do
# NOTE cannot use single-quoted heredoc because of https://github.com/jruby/jruby/issues/4260
input = <<~EOS
input = <<~'EOS'
[indent="0"]
----
def names
Expand All @@ -1239,8 +1237,7 @@ def names
----
EOS

# NOTE cannot use single-quoted heredoc because of https://github.com/jruby/jruby/issues/4260
expected = <<~EOS.chop
expected = <<~'EOS'.chop
def names
@names.split
Expand All @@ -1256,8 +1253,7 @@ def names
end

test 'should not remove block indent if indent attribute is -1' do
# NOTE cannot use single-quoted heredoc because of https://github.com/jruby/jruby/issues/4260
input = <<~EOS
input = <<~'EOS'
[indent="-1"]
----
def names
Expand All @@ -1278,8 +1274,7 @@ def names
end

test 'should set block indent to value specified by indent attribute' do
# NOTE cannot use single-quoted heredoc because of https://github.com/jruby/jruby/issues/4260
input = <<~EOS
input = <<~'EOS'
[indent="1"]
----
def names
Expand All @@ -1300,8 +1295,7 @@ def names
end

test 'should set block indent to value specified by indent document attribute' do
# NOTE cannot use single-quoted heredoc because of https://github.com/jruby/jruby/issues/4260
input = <<~EOS
input = <<~'EOS'
:source-indent: 1
[source,ruby]
Expand Down Expand Up @@ -1337,8 +1331,7 @@ def names
----
EOS

# NOTE cannot use single-quoted heredoc because of https://github.com/jruby/jruby/issues/4260
expected = <<~EOS.chop
expected = <<~'EOS'.chop
def names
@names.split
Expand Down Expand Up @@ -1828,8 +1821,7 @@ def names
end

test 'should strip leading and trailing blank lines when converting raw block' do
# NOTE cannot use single-quoted heredoc because of https://github.com/jruby/jruby/issues/4260
input = <<~EOS
input = <<~'EOS'
++++
line above
++++
Expand Down
Loading

0 comments on commit 64f5261

Please sign in to comment.