+# Client-side compiled CCL: this will fail due to incorrect syntax
+$q = Net::Z3950::ZOOM::query_create();
+ok(defined $q, "create empty query");
+my($ccl_errcode, $ccl_errstr, $ccl_errpos) = (0, "", 0);
+
+$res = Net::Z3950::ZOOM::query_ccl2rpn($q,
+ 'ti=utah and',
+ "ti u=4 s=pw\nab u=62 s=pw",
+ $ccl_errcode, $ccl_errstr, $ccl_errpos);
+ok($res < 0 &&
+ $ccl_errcode == Net::Z3950::ZOOM::CCL_ERR_TERM_EXPECTED,
+ "can't make CCL2RPN query: error $ccl_errcode ($ccl_errstr)");
+Net::Z3950::ZOOM::query_destroy($q);
+
+# Do a successful client-compiled CCL search
+$q = Net::Z3950::ZOOM::query_create();
+ok(defined $q, "create empty query");
+$res = Net::Z3950::ZOOM::query_ccl2rpn($q,
+ 'ti=utah and ab=epicenter',
+ "ti u=4 s=pw\nab u=62 s=pw",
+ $ccl_errcode,
+ $ccl_errstr,
+ $ccl_errpos);
+ok($res == 0, "created CCL2RPN query");
+check_record($conn, $q);
+Net::Z3950::ZOOM::query_destroy($q);
+