summaryrefslogtreecommitdiffstats
path: root/test/src/java
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2006-09-13 17:45:21 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2006-09-13 17:45:21 +0000
commit21f83e85b4e98f397478c2415b57c47bbeba0194 (patch)
tree1051b5708f463f93bb73493f1d98feb08b9e2876 /test/src/java
parent4aab96f721af42e2f559993b4812d0021208f24c (diff)
downloadjackcess-21f83e85b4e98f397478c2415b57c47bbeba0194.tar.gz
jackcess-21f83e85b4e98f397478c2415b57c47bbeba0194.zip
implement overflow row reading
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/trunk@108 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'test/src/java')
-rw-r--r--test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java28
1 files changed, 28 insertions, 0 deletions
diff --git a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java
index 221131a..78dba1b 100644
--- a/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java
+++ b/test/src/java/com/healthmarketscience/jackcess/DatabaseTest.java
@@ -525,6 +525,34 @@ public class DatabaseTest extends TestCase {
List<Column> columns = open().getTable("Table2").getColumns();
assertEquals(89, columns.size());
}
+
+ public void testOverflow() throws Exception
+ {
+ Database mdb = Database.open(new File("test/data/overflowTest.mdb"));
+ Table table = mdb.getTable("Table1");
+
+ // 7 rows, 3 and 5 are overflow
+ table.getNextRow();
+ table.getNextRow();
+
+ Map<String, Object> row = table.getNextRow();
+ assertEquals(Arrays.<Object>asList(
+ null, "row3col3", null, null, null, null, null,
+ "row3col9", null),
+ new ArrayList<Object>(row.values()));
+
+ table.getNextRow();
+
+ row = table.getNextRow();
+ assertEquals(Arrays.<Object>asList(
+ null, "row5col2", null, null, null, null, null, null,
+ null),
+ new ArrayList<Object>(row.values()));
+
+ table.reset();
+ assertEquals(7, countRows(table));
+
+ }
private Object[] createTestRow(String col1Val) {
return new Object[] {col1Val, "R", "McCune", 1234, (byte) 0xad, 555.66d,