2011-04-13 19:35:41 +00:00
|
|
|
require File.expand_path('../helper', __FILE__)
|
|
|
|
|
2011-04-20 19:51:13 +00:00
|
|
|
class RoccoHeredocTest < Test::Unit::TestCase
|
2011-04-13 19:35:41 +00:00
|
|
|
def test_basics
|
|
|
|
r = Rocco.new( 'test', '', { :language => "rb" } ) { "" } # Generate throwaway instance so I can test `parse`
|
|
|
|
assert_equal(
|
|
|
|
[
|
|
|
|
[ [ "Comment 1" ], [ "heredoc <<-EOH", "#comment", "code", "EOH" ] ]
|
|
|
|
],
|
|
|
|
r.parse( "# Comment 1\nheredoc <<-EOH\n#comment\ncode\nEOH" )
|
|
|
|
)
|
|
|
|
end
|
|
|
|
end
|