Changeset 128 for trunk/run-tests.rb

Show
Ignore:
Timestamp:
05/19/2006 15:52:10 (3 years ago)
Author:
cardmagic
Message:

Fixing hardbreaks

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • trunk/run-tests.rb

    r97 r128  
    1111    errors = [] 
    1212    tests = 0 
     13    options = (testfile =~ /hardbreaks/) ? [:hard_breaks] : [] 
     14     
    1315    print File.basename(testfile)+":\n\t" 
    1416    YAML::load_documents( File.open( testfile ) ) do |doc| 
    1517        if doc['in'] and doc['out'] 
    1618            tests += 1 
    17             red = RedCloth.new( doc['in'] ) 
     19            red = RedCloth.new( doc['in'], options ) 
    1820            html = if testfile =~ /markdown/ 
    1921                       red.to_html( :markdown ) 
    2022                   elsif testfile =~ /docbook/ 
    2123                                                                                         red.to_docbook 
     24                   elsif testfile =~ /textile/ 
     25                       red.to_html( :textile ) 
    2226                   else 
    2327                       red.to_html