Sha256: 4223ff67dfada8c97dc8cdaca3332d264f3dc08a2fc390d62432e4529027216a

Contents?: true

Size: 1.22 KB

Versions: 9

Compression:

Stored size: 1.22 KB

Contents

#!/usr/local/bin/ruby
if $0 == __FILE__
  Dir.chdir File.dirname(__FILE__)+'/../'
  $:.unshift File.expand_path('../lib/')
end

require 'rio'
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

9 entries across 9 versions & 2 rubygems

Version Path
rio-0.6.0 test/tc/pathop.rb
wishdev-rio-0.4.3.1 test/tc/pathop.rb
rio-0.5.1 test/tc/pathop.rb
rio-0.3.7 test/tc/pathop.rb
rio-0.3.8 test/tc/pathop.rb
rio-0.3.9 test/tc/pathop.rb
rio-0.4.2 test/tc/pathop.rb
rio-0.4.0 test/tc/pathop.rb
rio-0.4.1 test/tc/pathop.rb