test_sys.rb 521 B

1234567891011121314151617181920
  1. require File.expand_path('../helper', __FILE__)
  2. begin
  3. old_verbose = $VERBOSE
  4. $VERBOSE = nil
  5. require 'rake/contrib/sys'
  6. ensure
  7. $VERBOSE = old_verbose
  8. end
  9. class TestSys < Rake::TestCase
  10. def test_split_all
  11. assert_equal ['a'], Sys.split_all('a')
  12. assert_equal ['..'], Sys.split_all('..')
  13. assert_equal ['/'], Sys.split_all('/')
  14. assert_equal ['a', 'b'], Sys.split_all('a/b')
  15. assert_equal ['/', 'a', 'b'], Sys.split_all('/a/b')
  16. assert_equal ['..', 'a', 'b'], Sys.split_all('../a/b')
  17. end
  18. end