test/contrib/test_sys.rb in rake-0.8.7 vs test/contrib/test_sys.rb in rake-0.9.0.beta.0

- old
+ new

@@ -1,41 +1,18 @@ #!/usr/bin/env ruby require 'test/unit' require 'test/filecreation' -require 'rake/contrib/sys' +begin + old_verbose = $VERBOSE + $VERBOSE = nil + require 'rake/contrib/sys' +ensure + $VERBOSE = old_verbose +end class TestSys < Test::Unit::TestCase include FileCreation - -# def test_delete -# create_file("testdata/a") -# Sys.delete_all("testdata/a") -# assert ! File.exist?("testdata/a") -# end - -# def test_copy -# create_file("testdata/a") -# Sys.copy("testdata/a", "testdata/b") -# assert File.exist?("testdata/b") -# end - -# def test_for_files -# test_files = ["testdata/a.pl", "testdata/c.pl", "testdata/b.rb"] -# test_files.each { |fn| create_file(fn) } -# list = [] -# Sys.for_files("testdata/*.pl", "testdata/*.rb") { |fn| -# list << fn -# } -# assert_equal test_files.sort, list.sort -# end - -# def test_indir -# here = Dir.pwd -# Sys.makedirs("testdata/dir") -# assert_equal "#{here}/testdata/dir", Sys.indir("testdata/dir") { Dir.pwd } -# assert_equal here, Dir.pwd -# end def test_split_all assert_equal ['a'], Sys.split_all('a') assert_equal ['..'], Sys.split_all('..') assert_equal ['/'], Sys.split_all('/')