Sha256: 546a270149c5e1e77f983abf9324722af678410ecc3213cb96e62e74ec6d4ce5

Contents?: true

Size: 1.2 KB

Versions: 51

Compression:

Stored size: 1.2 KB

Contents

#!/usr/bin/ruby
#
# Unit test for bugs found in BlueCloth
# $Id: 10_Bug.tests.rb 68 2004-08-25 05:14:37Z ged $
#
# Copyright (c) 2004 The FaerieMUD Consortium.
# 

if !defined?( BlueCloth ) || !defined?( BlueCloth::TestCase )
	basedir = File::dirname( __FILE__ )
	require File::join( basedir, 'bctestcase' )
end


require 'timeout'

### This test case tests ...
class BugsTestCase < BlueCloth::TestCase
	BaseDir = File::dirname( File::dirname(File::expand_path( __FILE__ )) )

	### Test to be sure the README file can be transformed.
	def test_00_slow_block_regex
		contents = File::read( File::join(BaseDir,"README") )
		bcobj = BlueCloth::new( contents )

		assert_nothing_raised {
			timeout( 2 ) do
				bcobj.to_html
			end
		}
	end

	### :TODO: Add more documents and test their transforms.

	def test_10_regexp_engine_overflow_bug
		contents = File::read( File::join(BaseDir,"tests/data/re-overflow.txt") )
		bcobj = BlueCloth::new( contents )

		assert_nothing_raised {
			bcobj.to_html
		}
	end
	
	def test_15_regexp_engine_overflow_bug2
		contents = File::read( File::join(BaseDir,"tests/data/re-overflow2.txt") )
		bcobj = BlueCloth::new( contents )

		assert_nothing_raised {
			bcobj.to_html
		}
	end
	
end


__END__

Version data entries

51 entries across 51 versions & 4 rubygems

Version Path
radiantcms-couchrest_model-0.2.4 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiantcms-couchrest_model-0.2.2 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiantcms-couchrest_model-0.2.1 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiantcms-couchrest_model-0.2 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiantcms-couchrest_model-0.1.9 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiantcms-couchrest_model-0.1.8 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiantcms-couchrest_model-0.1.7 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiantcms-couchrest_model-0.1.6 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiantcms-couchrest_model-0.1.5 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.7.2 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.8.2 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiant-rc-0.9.0 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.8.1 vendor/extensions/markdown_filter/vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.6.1 vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.6.0 vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.6.3 vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.6.2 vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.6.5.1 vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.6.4 vendor/bluecloth/tests/10_Bug.tests.rb
radiant-0.6.5 vendor/bluecloth/tests/10_Bug.tests.rb