summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/ejdb/tests/ejdbtest2.c25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/ejdb/tests/ejdbtest2.c b/src/ejdb/tests/ejdbtest2.c
index e46fe48..5cbbb36 100644
--- a/src/ejdb/tests/ejdbtest2.c
+++ b/src/ejdb/tests/ejdbtest2.c
@@ -6030,6 +6030,30 @@ void testTicket117(void) {
tcxstrdel(log);
}
+void testTicket142()
+{
+ EJCOLL *coll = ejdbcreatecoll(jb, "ticket142", NULL);
+ CU_ASSERT_PTR_NOT_NULL_FATAL(coll);
+
+ bson b;
+ bson_oid_t oid;
+
+ bson_init(&b);
+ bson_append_int(&b, "id", 18);
+ bson_append_symbol(&b, "sym", "eighteen");
+ bson_finish(&b);
+ CU_ASSERT_TRUE(ejdbsavebson(coll, &b, &oid);
+ bson_destroy(&b);
+
+ /* Verify that id=18 contain record with symbol */
+ bson bsq;
+ bson_init_as_query(&bsq);
+ bson_append_int(&bsq, "id", 18);
+ bson_finish(&bsq);
+ CU_ASSERT_FALSE_FATAL(bsq.err);
+
+
+}
int main() {
setlocale(LC_ALL, "en_US.UTF-8");
@@ -6124,6 +6148,7 @@ int main() {
(NULL == CU_add_test(pSuite, "testDistinct", testDistinct)) ||
(NULL == CU_add_test(pSuite, "testSlice", testSlice)) ||
(NULL == CU_add_test(pSuite, "testTicket117", testTicket117)) ||
+ (NULL == CU_add_test(pSuite, "testTicket142", testTicket142)) ||
(NULL == CU_add_test(pSuite, "testMetaInfo", testMetaInfo))
) {
CU_cleanup_registry();