Skip to content
Browse files

One more test.

  • Loading branch information...
1 parent c1afb8a commit 3ebbb82f14196f7b0b70f79a29c28d369612968c @mikewest mikewest committed Apr 19, 2011
Showing with 10 additions and 1 deletion.
  1. +10 −1 test/test_docblock_annotations.rb
View
11 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 @@ def test_docblock_annotation_conversion
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(
+ "<p>Comment</p>\n\n<blockquote><p><strong>param</strong> type name</p></blockquote>\n",
+ highlighted[0][0]
+ )
+ end
end

0 comments on commit 3ebbb82

Please sign in to comment.
Something went wrong with that request. Please try again.