test/test_compiler.rb in review-2.4.0 vs test/test_compiler.rb in review-2.5.0
- old
+ new
@@ -40,9 +40,15 @@
args = @c.__send__(:parse_args, '[foo][bar\\\\buz]')
assert_equal ['foo', 'bar\\buz'], args
end
def test_replace_fence
- actual = @c.__send__(:replace_fence, '@<m>${}\\}|$, @<m>|{}\\}\\$|, @<m>|\\{\\a\\}|, @<tt>|}|, @<tt>|\\|, @<tt>|\\\\|, @<tt>|\\\\\\|')
- assert_equal '@<m>{{\\}\\\\\\}|}, @<m>{{\\}\\\\\\}\\$}, @<m>{\\{\\a\\\\\\}}, @<tt>{\\}}, @<tt>{\\\\}, @<tt>{\\\\\\\\}, @<tt>{\\\\\\\\\\\\}', actual
+ source_str = <<-'EOB'
+@<m>${}\}|$, @<m>|{}\}\$|, @<m>|\{\a\}|, @<tt>|}|, @<tt>|\|, @<tt>|\\|, @<tt>|\\\|
+ EOB
+ expected = <<-'EOB'
+@<m>{{\}\\\}|}, @<m>{{\}\\\}\$}, @<m>{\{\a\\\}}, @<tt>{\}}, @<tt>{\\}, @<tt>{\\\\}, @<tt>{\\\\\\}
+ EOB
+ actual = @c.__send__(:replace_fence, source_str)
+ assert_equal expected, actual
end
end