test/test_roo.rb in roo-0.8.0 vs test/test_roo.rb in roo-0.8.1
- old
+ new
@@ -18,17 +18,18 @@
yield
end
end
DISPLAY_LOG = false
-DB_LOG = true
+DB_LOG = false
if DB_LOG
# gem 'activerecord', '< 2.0.0'
# require 'activerecord'
- require_gem 'activerecord', '< 2.0.0'
- #require 'activerecord'
+ # require_gem 'activerecord', '< 2.0.0'
+ gem 'activerecord', '< 2.0.0'
+ require 'activerecord'
end
include FileUtils
if DB_LOG
@@ -123,11 +124,11 @@
OPENOFFICE = true # do Openoffice-Spreadsheet Tests?
EXCEL = true # do Excel Tests?
GOOGLE = true # do Google-Spreadsheet Tests?
OPENOFFICEWRITE = false # experimental: write access with OO-Documents
- ONLINE = false
+ ONLINE = true
LONG_RUN = false
GLOBAL_TIMEOUT = 2*12*60 # seconds
# helper method
@@ -2414,6 +2415,82 @@
oo.set_value(1,1,"hello from the tests")
#oo.set_value(1,1,"sin(1)")
assert_equal "hello from the tests", oo.cell(1,1)
end
end
+
+ def test_bug_bbu_openoffice
+ oo = Openoffice.new(File.join('test','bbu.ods'))
+ assert_nothing_raised() {
+ assert_equal "File: test/bbu.ods
+Number of sheets: 3
+Sheets: 2007_12, Tabelle2, Tabelle3
+Sheet 1:
+ First row: 1
+ Last row: 4
+ First column: A
+ Last column: F
+Sheet 2:
+ - empty -
+Sheet 3:
+ - empty -", oo.info
+ }
+
+ oo.default_sheet = oo.sheets[1] # empty sheet
+ assert_nil oo.first_row
+ assert_nil oo.last_row
+ assert_nil oo.first_column
+ assert_nil oo.last_column
+ end
+
+ def test_bug_bbu_excel
+ oo = Excel.new(File.join('test','bbu.xls'))
+ assert_nothing_raised() {
+ assert_equal "File: test/bbu.xls
+Number of sheets: 3
+Sheets: 2007_12, Tabelle2, Tabelle3
+Sheet 1:
+ First row: 1
+ Last row: 4
+ First column: A
+ Last column: F
+Sheet 2:
+ - empty -
+Sheet 3:
+ - empty -", oo.info
+ }
+
+ oo.default_sheet = oo.sheets[1] # empty sheet
+ assert_nil oo.first_row
+ assert_nil oo.last_row
+ assert_nil oo.first_column
+ assert_nil oo.last_column
+ end
+
+if false
+ # there is no google spreadsheet for this test
+ def test_bug_bbu_google
+ oo = Excel.new(key_of('bbu'))
+ assert_nothing_raised() {
+ assert_equal "File: test/bbu.xls
+Number of sheets: 3
+Sheets: 2007_12, Tabelle2, Tabelle3
+Sheet 1:
+ First row: 1
+ Last row: 4
+ First column: A
+ Last column: F
+Sheet 2:
+ - empty -
+Sheet 3:
+ - empty -", oo.info
+ }
+
+ oo.default_sheet = oo.sheets[1] # empty sheet
+ assert_nil oo.first_row
+ assert_nil oo.last_row
+ assert_nil oo.first_column
+ assert_nil oo.last_column
+ end
+end # false
+
end # class