Sha256: 8e5278b69f41bf01036bb897e2437c8cdffcf193be5cfa0c58759539ae8d06a6
Contents?: true
Size: 1.01 KB
Versions: 5
Compression:
Stored size: 1.01 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' require 'open-uri' require 'ftp/testdef' class TC_ftp2ftp < Test::RIO::TestCase @@once = false include Test::RIO::FTP::Const def self.once @@once = true end def setup super self.class.once unless @@once FS_RWROOT.entries { |ent| ent.delete! } end def test_cp_ro2rw_file1 fname = 'f0' src = FTP_ROROOT/fname dst = FTP_RWROOT/fname dst < src assert_equal(src.chomp[],dst.chomp[]) end def test_cp_ro2rw_file2 fname = 'f0' src = FTP_ROROOT/fname dst = FTP_RWROOT dst < src fdst = dst/fname assert_equal(src.chomp[],fdst.chomp[]) end def test_cp_ro2rw_dir fname = 'd0' src = FTP_ROROOT/fname dst = FTP_RWROOT dst < src ans = rio(FTP_RWROOT,fname).to_a exp = rio(FTP_ROROOT,fname).to_a.map{ |s| s.sub('ro','rw') } assert_equal(smap(exp),smap(ans)) end end
Version data entries
5 entries across 5 versions & 2 rubygems
Version | Path |
---|---|
wishdev-rio-0.4.3.1 | test/ftp/ftp2ftp.rb |
rio-0.3.9 | test/ftp/ftp2ftp.rb |
rio-0.4.0 | test/ftp/ftp2ftp.rb |
rio-0.4.1 | test/ftp/ftp2ftp.rb |
rio-0.4.2 | test/ftp/ftp2ftp.rb |