aboutsummaryrefslogtreecommitdiffstats
path: root/src/test
diff options
context:
space:
mode:
authorJames Ahlborn <jtahlborn@yahoo.com>2018-03-31 02:36:50 +0000
committerJames Ahlborn <jtahlborn@yahoo.com>2018-03-31 02:36:50 +0000
commite7f3aa37a712a82b2753050787111864de36cdc2 (patch)
tree089fa3187bb08d00f3edc90c3efdcfeb14c4c5dd /src/test
parentb8f3fcca022295700464d59133e2d64db19476f4 (diff)
downloadjackcess-e7f3aa37a712a82b2753050787111864de36cdc2.tar.gz
jackcess-e7f3aa37a712a82b2753050787111864de36cdc2.zip
fix null handling for string funcs
git-svn-id: https://svn.code.sf.net/p/jackcess/code/jackcess/branches/exprs@1145 f203690c-595d-4dc9-a70b-905162fa7fd2
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java9
1 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 0eec59b..ae9916c 100644
--- a/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java
+++ b/src/test/java/com/healthmarketscience/jackcess/impl/expr/DefaultFunctionsTest.java
@@ -59,6 +59,15 @@ public class DefaultFunctionsTest extends TestCase
assertEquals("23072", eval("=Oct(9786)"));
assertEquals(" 9786", eval("=Str(9786)"));
assertEquals("-42", eval("=Str(-42)"));
+ assertEquals("-42", eval("=Str$(-42)"));
+ assertNull(eval("=Str(Null)"));
+
+ try {
+ eval("=Str$(Null)");
+ fail("UnsupportedOperationException should have been thrown");
+ } catch(UnsupportedOperationException expected) {
+ // success
+ }
assertEquals(-1, eval("=CBool(\"1\")"));
assertEquals(13, eval("=CByte(\"13\")"));