Changeset 73

Show
Ignore:
Timestamp:
05/12/05 12:26:33 (4 years ago)
Author:
ged
Message:

- Added new tests for bug #17 (two-character bold/italic bug)
- Added new test for bug #12 (Ruby with warnings enabled causes ArgumentError?)

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/tests/10_Bug.tests.rb

    r68 r73  
    44# $Id$ 
    55# 
    6 # Copyright (c) 2004 The FaerieMUD Consortium. 
     6# Copyright (c) 2004, 2005 The FaerieMUD Consortium. 
    77#  
    88 
     
    5151    end 
    5252     
     53    def test_20_two_character_bold_asterisks 
     54        html = nil 
     55        str = BlueCloth::new( "**aa**" ) 
     56        assert_nothing_raised do 
     57            html = str.to_html 
     58        end 
     59 
     60        assert_equal "<p><strong>aa</strong></p>", html 
     61    end 
     62 
     63    def test_21_two_character_bold_underscores 
     64        html = nil 
     65        str = BlueCloth::new( "__aa__" ) 
     66        assert_nothing_raised do 
     67            html = str.to_html 
     68        end 
     69 
     70        assert_equal "<p><strong>aa</strong></p>", html 
     71    end 
     72     
     73    def test_22_two_character_emphasis_asterisks 
     74        html = nil 
     75        str = BlueCloth::new( "*aa*" ) 
     76        assert_nothing_raised do 
     77            html = str.to_html 
     78        end 
     79 
     80        assert_equal "<p><em>aa</em></p>", html 
     81    end 
     82 
     83    def test_23_two_character_emphasis_underscores 
     84        html = nil 
     85        str = BlueCloth::new( "_aa_" ) 
     86        assert_nothing_raised do 
     87            html = str.to_html 
     88        end 
     89 
     90        assert_equal "<p><em>aa</em></p>", html 
     91    end 
     92 
     93    def test_24_ruby_with_warnings_enabled_causes_ArgumentError 
     94        oldverbose = $VERBOSE 
     95 
     96        assert_nothing_raised do 
     97            $VERBOSE = true 
     98            BlueCloth.new( "*woo*" ).to_html 
     99        end 
     100    ensure 
     101        $VERBOSE = oldverbose 
     102    end 
     103     
     104     
    53105end 
    54106