aboutsummaryrefslogtreecommitdiffstats
path: root/src/test/java/com/healthmarketscience/jackcess/impl
diff options
context:
space:
mode:
Diffstat (limited to 'src/test/java/com/healthmarketscience/jackcess/impl')
-rw-r--r--src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java5
-rw-r--r--src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java4
2 files changed, 9 insertions, 0 deletions
diff --git a/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java b/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java
index 4051fde..f4f037b 100644
--- a/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java
+++ b/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java
@@ -161,6 +161,11 @@ public class DefaultFunctionsTest extends TestCase
assertEquals(1, eval("=StrComp('bar', 'FOO', 0)"));
assertEquals(-1, eval("=StrComp('FOO', 'foo', 0)"));
+ assertEquals("FOO", eval("=StrConv('foo', 1)"));
+ assertEquals("foo", eval("=StrConv('foo', 2)"));
+ assertEquals("foo", eval("=StrConv('FOO', 2)"));
+ assertEquals("Foo Bar", eval("=StrConv('FOO bar', 3)"));
+
assertEquals("halb", eval("=StrReverse('blah')"));
assertEquals("foo", eval("=Choose(1,'foo','bar','blah')"));
diff --git a/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java b/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java
index d7b5a00..4c50f12 100644
--- a/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java
+++ b/src/test/java/com/healthmarketscience/jackcess/impl/expr/ExpressionatorTest.java
@@ -322,6 +322,10 @@ public class ExpressionatorTest extends TestCase
assertEquals(new Date(1044680400000L), eval("=#01/02/2003# + '37'"));
assertEquals(new Date(1044680400000L), eval("='37' + #01/02/2003#"));
assertEquals(new Date(1041508800000L), eval("=#01/02/2003 7:00:00 AM#"));
+
+ assertEquals("2/8/2003", eval("=CStr(#01/02/2003# + '37')"));
+ assertEquals("9:24:00 AM", eval("=CStr(#7:00:00 AM# + 0.1)"));
+ assertEquals("1/2/2003 1:10:00 PM", eval("=CStr(#01/02/2003# + #13:10:00#)"));
}
public void testNull() throws Exception