test/tc/copy-from.rb in rio-0.3.7 vs test/tc/copy-from.rb in rio-0.3.8
- old
+ new
@@ -5,11 +5,11 @@
end
require 'rio'
require 'tc/testcase'
-class TC_copyfrom < Test::RIO::TestCase
+class TC_copy_from < Test::RIO::TestCase
@@once = false
def self.once
@@once = true
rio('d0').rmtree.mkpath
@@ -118,60 +118,9 @@
ario < ios
$trace_states = false
ios.close
ans = ario.readlines
assert_equal(exp,ans)
- end
- def test_uri_rio_to_file
- ario = rio('out').delete!.touch
- url = 'http://localhost/rio/hw.html'
- urio = rio(url)
- ario < urio
- exp = urio.contents
- assert_equal(exp,ario.contents)
- end
- def test_uri_rio_to_dir
- ario = rio('ud').delete!.mkdir
- url = 'http://localhost/rio/hw.html'
- urio = rio(url)
- #$trace_states = true
- ario < urio
- $trace_states = false
- drio = rio(ario,urio.filename)
- assert(drio.file?)
- assert(urio.contents,drio.contents)
- end
- def test_uri_string_to_dir
- ario = rio('uds').delete!.mkdir
- url = 'http://localhost/rio/hw.html'
- urio = rio(url)
- #$trace_states = true
- ario < url
- $trace_states = false
- drio = rio(ario,urio.filename)
- assert(drio.file?)
- assert(urio.contents,drio.contents)
- end
- def test_url_string_to_file
- ario = rio('out').delete!.touch
- url = 'http://localhost/rio/hw.html'
- ario < url
- exp = url
- assert_equal(exp,ario.contents)
- end
- def test_url_array_to_file
- ario = rio('out').delete!.touch
- url = 'http://localhost/rio/hw.html'
- ario < [url]
- exp = url
- assert_equal(exp,ario.contents)
- end
- def test_url_string_to_nonex
- ario = rio('outz').delete!
- url = 'http://localhost/rio/hw.html'
- ario < url
- exp = url
- assert_equal(exp,ario.contents)
end
def test_simple_ary
dst = rio('dst').delete!.mkpath
dst < @d0[]
assert_rios_equal(@d0,dst,"simple rio copy")