+
+ YAZ_CHECK(tst_query("title = \"x y\"", "title=\"x y\""));
+ YAZ_CHECK(tst_query("title = x y", "title=\"x\" \"y\""));
+
+ YAZ_CHECK(tst_query("title = x y z", "title=\"x\" \"y\" \"z\""));
+
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox dinosaurs",
+ "(dc.title=\"encyclopedia\") % (\"dinosaurs\")"));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/distance<=3 dinosaurs",
+ "(dc.title=\"encyclopedia\") %3 (\"dinosaurs\")"));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/distance<=3/unit=word "
+ "dinosaurs",
+ "(dc.title=\"encyclopedia\") %3 (\"dinosaurs\")"));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/distance<=3/unit=phrase "
+ "dinosaurs", 0));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/distance<=3/a=b "
+ "dinosaurs", 0));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/a=b dinosaurs", 0));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/distance<3 dinosaurs",
+ "(dc.title=\"encyclopedia\") %2 (\"dinosaurs\")"));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/distance=3 dinosaurs", 0));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/distance>3 dinosaurs", 0));
+ YAZ_CHECK(tst_query("dc.title=encyclopedia prox/distance>=3 dinosaurs", 0));
+ YAZ_CHECK(tst_query_s("a sortby title", "\"a\"",
+ "title,,1,0,highValue"));
+ YAZ_CHECK(tst_query_s("a sortby dc.title", "\"a\"",
+ "title,dc,1,0,highValue"));
+ YAZ_CHECK(tst_query_s("a sortby title/ascending", "\"a\"",
+ "title,,1,0,highValue"));
+ YAZ_CHECK(tst_query_s("a sortby title/descending", "\"a\"",
+ "title,,0,0,highValue"));
+ YAZ_CHECK(tst_query_s("a sortby title/ignoreCase", "\"a\"",
+ "title,,1,0,highValue"));
+ YAZ_CHECK(tst_query_s("a sortby title/respectCase", "\"a\"",
+ "title,,1,1,highValue"));
+ YAZ_CHECK(tst_query_s("a sortby title/missingOmit", "\"a\"",
+ "title,,1,0,omit"));
+ YAZ_CHECK(tst_query_s("a sortby title/missingFail", "\"a\"",
+ "title,,1,0,abort"));
+ YAZ_CHECK(tst_query_s("a sortby title/missingLow", "\"a\"",
+ "title,,1,0,lowValue"));
+ YAZ_CHECK(tst_query_s("a sortby title/missingHigh", "\"a\"",
+ "title,,1,0,highValue"));
+ YAZ_CHECK(tst_query_s("a sortby title/sort.missingHigh", "\"a\"",
+ "title,,1,0,highValue"));
+ YAZ_CHECK(tst_query_s("a sortby title/bogus", "\"a\"", 0));
+
+ YAZ_CHECK(tst_query_s("a sortby dc.year dc.author", "\"a\"",
+ "year,dc,1,0,highValue author,dc,1,0,highValue"));
+