# _____ _ # |_ _|__ ___| |_ # | |/ _ \/ __| __| # | | __/\__ \ |_ # |_|\___||___/\__| # # for lib/nano/dir/self/ascend.rb # # Extracted Fri Oct 28 14:20:18 EDT 2005 # Unit Tools Reap Test Extractor # require 'nano/dir/self/ascend.rb' require 'test/unit' class TCDir < Test::Unit::TestCase def test_ascend_1 c = [] Dir.ascend( "this/path/up" ) do |path| c << path end assert_equal( 'this/path/up', c[0] ) assert_equal( 'this/path', c[1] ) assert_equal( 'this', c[2] ) end def test_ascend_2 c = [] Dir.ascend( "this/path/up", false ) do |path| c << path end assert_equal( 'this/path', c[0] ) assert_equal( 'this', c[1] ) end end