test case for RUBY-99
This commit is contained in:
parent
4010dbc994
commit
25b783a0c8
BIN
test/data/data.tar.gz
Normal file
BIN
test/data/data.tar.gz
Normal file
Binary file not shown.
Binary file not shown.
@ -133,6 +133,18 @@ class GridStoreTest < Test::Unit::TestCase
|
||||
#assert_equal ('x' * size) + ('y' * size) + ('z' * size), GridStore.read(@@db, 'biggie')
|
||||
end
|
||||
|
||||
def test_binary
|
||||
file = File.open(File.join(File.dirname(__FILE__), 'data', 'data.tar.gz'), 'r')
|
||||
GridStore.open(@@db, 'zip', 'w') do |f|
|
||||
f.write(file.read)
|
||||
end
|
||||
|
||||
file.rewind
|
||||
GridStore.open(@@db, 'zip', 'r') do |f|
|
||||
assert_equal file.read.length, f.read.length
|
||||
end
|
||||
end
|
||||
|
||||
def test_puts_and_readlines
|
||||
GridStore.open(@@db, 'multiline', 'w') { |f|
|
||||
f.puts "line one"
|
||||
|
Loading…
Reference in New Issue
Block a user