summaryrefslogtreecommitdiff
path: root/test/rake/test_sys.rb
blob: 21f7e2c70824472993d4ca87f71a13bf55f0dc26 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
require File.expand_path('../helper', __FILE__)
begin
  old_verbose = $VERBOSE
  $VERBOSE = nil
  require 'rake/contrib/sys'
ensure
  $VERBOSE = old_verbose
end

class TestSys < Rake::TestCase

  def test_split_all
    assert_equal ['a'], Sys.split_all('a')
    assert_equal ['..'], Sys.split_all('..')
    assert_equal ['/'], Sys.split_all('/')
    assert_equal ['a', 'b'], Sys.split_all('a/b')
    assert_equal ['/', 'a', 'b'], Sys.split_all('/a/b')
    assert_equal ['..', 'a', 'b'], Sys.split_all('../a/b')
  end
end