Sha256: 328aa849da92dd43c37ebce8a6fe7867fcb62b1a467d3b36656d123595b4fc3e
Contents?: true
Size: 1.29 KB
Versions: 5
Compression:
Stored size: 1.29 KB
Contents
#!/usr/local/bin/ruby if $0 == __FILE__ Dir.chdir File.dirname(__FILE__)+'/../' $:.unshift File.expand_path('../lib/') end require 'rio' require 'test/unit' require 'test/unit/testsuite' require 'extensions/symbol' require 'tc/testcase' class TC_pathop < Test::RIO::TestCase @@once = false def self.once @@once = true rio('d0').rmtree.mkpath rio('d0/d2').rmtree.mkpath rio('d0/d3').rmtree.mkpath rio('d0/d4').rmtree.mkpath rio('d0/d2/d3').rmtree.mkpath rio('d0/d2/d5').rmtree.mkpath rio('d0/d3/d6').rmtree.mkpath rio('d1').rmtree.mkpath rio('d1/d8').rmtree.mkpath make_lines_file(1,'d1/f0') make_lines_file(2,'d1/f1') make_lines_file(1,'d0/f0') make_lines_file(2,'d0/f1') make_lines_file(1,'d0/d2/f0') make_lines_file(2,'d0/d2/f1') make_lines_file(1,'d0/d3/d6/f0') make_lines_file(2,'d0/d3/d6/f1') end def setup super self.class.once unless @@once @d0 = rio('d0') @d1 = rio('d1') @d2 = @d0/'d2' @f0 = @d0/'f0' @f1 = @d0/'f1' @f2 = @d0/'d2'/'f2' @f3 = @d0/'d2'/'f3' end def test_p1 src = rio(@d1) dst = [] puts @f3 p File.split('/qe/pi/') end def test_p2 p1 = rio('p1') p2 = rio('p2') p3 = p1.join(p2) puts p1,p3 p3 = p1.join!(p2) puts p1,p3 end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
rio-0.3.1 | test/tc/pathop.rb |
rio-0.3.2 | test/tc/pathop.rb |
rio-0.3.3 | test/tc/pathop.rb |
rio-0.3.6 | test/tc/pathop.rb |
rio-0.3.4 | test/tc/pathop.rb |