require File.expand_path('../helper', __FILE__)
class RoccoSourceListTests < Test::Unit::TestCase
def test_flat_sourcelist
r = Rocco.new( 'issue26.sh', [ 'issue26a.sh', 'issue26b.sh', 'issue26c.sh' ] ) {
"# Comment 1\n# Comment 1\nprint 'omg!'"
}
html = r.to_html
assert(
html.include?( 'issue26a.sh' ) &&
html.include?( 'issue26b.sh' ) &&
html.include?( 'issue26c.sh' ),
"URLs correctly generated for files in a flat directory structure"
)
end
def test_heiarachical_sourcelist
r = Rocco.new( 'a/issue26.sh', [ 'a/issue26a.sh', 'b/issue26b.sh', 'c/issue26c.sh' ] ) {
"# Comment 1\n# Comment 1\nprint 'omg!'"
}
html = r.to_html
assert(
html.include?( 'issue26a.sh' ) &&
html.include?( 'issue26b.sh' ) &&
html.include?( 'issue26c.sh' ),
"URLs correctly generated for files in a flat directory structure"
)
end
end