From 3ebbb82f14196f7b0b70f79a29c28d369612968c Mon Sep 17 00:00:00 2001 From: Mike West Date: Tue, 19 Apr 2011 19:54:42 +0200 Subject: [PATCH] One more test. --- test/test_docblock_annotations.rb | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/test_docblock_annotations.rb b/test/test_docblock_annotations.rb index 5fb05a6..41af56d 100644 --- a/test/test_docblock_annotations.rb +++ b/test/test_docblock_annotations.rb @@ -1,7 +1,7 @@ require File.expand_path('../helper', __FILE__) class RoccoDocblockAnnotationsTest < Test::Unit::TestCase - def test_docblock_annotation_conversion + def test_basics r = Rocco.new( 'test', '', { :language => "c", :docblocks => true } ) { "" } # Generate throwaway instance so I can test `parse` assert_equal( [ @@ -10,4 +10,13 @@ class RoccoDocblockAnnotationsTest < Test::Unit::TestCase r.docblock( ["Comment\n\n@param mixed foo\n@return void"] ) ) end + def test_highlighted_in_blocks + r = Rocco.new( 'test', '', { :language => "c", :docblocks => true } ) { "" } # Generate throwaway instance so I can test `parse` + highlighted = r.highlight( r.split( r.parse( "/**\n * Comment\n * @param type name\n */\ndef codeblock\nend\n" ) ) ) + + assert_equal( + "

Comment

\n\n

param type name

\n", + highlighted[0][0] + ) + end end