diff options
author | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-20 03:22:49 +0000 |
---|---|---|
committer | drbrain <drbrain@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2010-12-20 03:22:49 +0000 |
commit | 2ef9c50c6e405717d06362787c4549ca4f1c6485 (patch) | |
tree | ee99486567461dd5796f3d6edcc9e204187f2666 /test/rdoc/test_rdoc_parser_perl.rb | |
parent | d7effd506f5b91a636f2e6452ef1946b923007c7 (diff) |
Import RDoc 3
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30249 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'test/rdoc/test_rdoc_parser_perl.rb')
-rw-r--r-- | test/rdoc/test_rdoc_parser_perl.rb | 73 |
1 files changed, 0 insertions, 73 deletions
diff --git a/test/rdoc/test_rdoc_parser_perl.rb b/test/rdoc/test_rdoc_parser_perl.rb deleted file mode 100644 index ce4e7d2b65..0000000000 --- a/test/rdoc/test_rdoc_parser_perl.rb +++ /dev/null @@ -1,73 +0,0 @@ -require 'stringio' -require 'tempfile' -require 'rubygems' -require 'minitest/autorun' -require 'rdoc/options' -require 'rdoc/parser/perl' - -class TestRdocParserPerlPOD < MiniTest::Unit::TestCase - - def setup - @tempfile = Tempfile.new self.class.name - filename = @tempfile.path - - @top_level = RDoc::TopLevel.new filename - @fn = filename - @options = RDoc::Options.new - @stats = RDoc::Stats.new 0 - end - - def teardown - @tempfile.close - end - - def test_uncommented_perl - content = <<-EOF -while (<>) { - tr/a-z/A-Z; - print -} - EOF - - comment = util_get_comment content - assert_equal "", comment - end - - def test_perl_without_pod - content = <<-EOF -#!/usr/local/bin/perl -# -#This is a pointless perl program because it does -p. -# -while(<>) {print;}: - EOF - - comment = util_get_comment content - assert_equal "", comment - end - - def test_simple_pod_no_structure - content = <<-EOF -=begin pod - -This just contains plain old documentation - -=end - EOF - comment = util_get_comment content - assert_equal 'This just contains plain old documentation', comment - end - - # Get the comment of the @top_level when it has processed the input. - def util_get_comment(content) - parser = util_parser content - parser.scan.comment - end - - # create a new parser with the supplied content. - def util_parser(content) - RDoc::Parser::PerlPOD.new @top_level, @fn, content, @options, @stats - end - -end - |