test/tc/noqae.rb in rio-0.4.2 vs test/tc/noqae.rb in rio-0.5.1

- old
+ new

@@ -4,12 +4,14 @@ $:.unshift File.expand_path('../lib/') end require 'rio' require 'tc/testcase' +require 'qpdir' + class TC_RIO_noqae < Test::Unit::TestCase - @@tdir = rio(%w/qp noqae/) + @@tdir = rio($QPDIR,%w/noqae/) @@once = false def initialize(*args) super end @@ -80,11 +82,11 @@ all = ['d0/d1','d0/d2','d0/c1','d0/c2','d0/f1','d0/f2','d0/l1','d0/l2'] all += ['d0/n1','d0/n2'] if $supports_symlink all end def test_noqae_fs - rio('qp/noqae').chdir do + rio($QPDIR,'noqae').chdir do begin begin ans = [] rio('d0').each { |el| ans << el } @@ -191,11 +193,11 @@ end end end def test_noqae_fs_de - @@tdir.abs.chdir do + @@tdir.chdir do begin begin ans = [] rio('d0').dirs.each { |el| assert(el.directory?) @@ -279,11 +281,11 @@ end #rio(wd).chdir end def test_noqae_fs_re - @@tdir.abs.chdir do + @@tdir.chdir do begin begin ere = /1/ exp = all.reject { |el| el =~ ere } @@ -440,11 +442,11 @@ end end def ztest_noqae_fs_re all = ['d0/d1','d0/d2','d0/c1','d0/c2','d0/f1','d0/f2','d0/n1','d0/n2','d0/l1','d0/l2'] - rio('qp/noqae').chdir do + rio($QPDIR,'noqae').chdir do begin begin ans = [] rio('d0').skipfiles(/2/).each { |el| ans << el } exp = all.reject { |el| el =~ /[fl]\d$/ } @@ -534,11 +536,11 @@ end end end def ztest_noqae_fs_lines - rio('qp/noqae').chdir do + rio($QPDIR,'noqae').chdir do begin begin ans = [] rio('d0').files.each { |f| f.each { |el| @@ -594,11 +596,11 @@ end end end def ztest_noqae_fs_lines_ss - rio('qp/noqae').chdir do + rio($QODIR,'noqae').chdir do begin begin ans = [] rio('d0').files.each { |f| f.each { |el| @@ -648,11 +650,11 @@ end end end def ztest_noqae_chomp - rio('qp/noqae').chdir do + rio($QPDIR,'noqae').chdir do begin begin ans = [] rio('d0/f1').each { |el| ans << el @@ -675,11 +677,11 @@ end def ztest_noqae_fs_nest ds = ['d1/d1','d1/d2','d1/d1/f1','d1/d1/f2','d1/d2/d1','d1/d2/d1/f1','d1/d2/d1/f2','d1/d2/d2', 'd1/d3','d1/d3/d1','d1/d3/f1','d1/d3/d1/f1','d1/d3/d1/d1'] - rio('qp/noqae').chdir do + rio($QPDIR,'noqae').chdir do begin begin ans = [] rio('d1').dirs.each { |dir| dir.each { |ent| @@ -783,10 +785,10 @@ end end def ztest_noqae_fs_all ds = ['d0/d1','d0/d2','d0/f1','d0/f2','d0/d1/d2','d0/d1/d2/d1','d0/d1/d2/f1','d0/d1/d2/d1/f1','d0/d1/d2/d1/f2'] - rio('qp/noqae').chdir do + rio($QPDIR,'noqae').chdir do begin begin ans = [] rio('d0').all.each { |el| ans << el } exp = ds.dup