test case for RUBY-99

This commit is contained in:
Kyle Banker 2010-02-23 11:16:11 -05:00
parent 4010dbc994
commit 25b783a0c8
3 changed files with 12 additions and 0 deletions

BIN
test/data/data.tar.gz Normal file

Binary file not shown.

Binary file not shown.

View File

@ -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"