- /* N>25, search attributes work */
- Q( "@attr 2=4 @attr gils 1=2040 @attr 4=109 25",2);
+ /* N>=25, search attributes work */
+ YAZ_CHECK(tl_query(zh, "@attr 2=4 @attr gils 1=2040 @attr 4=109 25", 2));
+
+ /* N>49, search attributes work */
+ YAZ_CHECK(tl_query(zh, "@attr 2=5 @attr gils 1=2040 @attr 4=109 49", 0));
+
+ /* N>=49, search attributes work */
+ YAZ_CHECK(tl_query(zh, "@attr 2=4 @attr gils 1=2040 @attr 4=109 49", 2));
+
+ /* N>48, search attributes work */
+ YAZ_CHECK(tl_query(zh, "@attr 2=5 @attr gils 1=2040 @attr 4=109 48", 2));
+
+ /* N<48, search attributes work */
+ YAZ_CHECK(tl_query(zh, "@attr 2=1 @attr gils 1=2040 @attr 4=109 48", 1));
+
+ /* N<=48, search attributes work */
+ YAZ_CHECK(tl_query(zh, "@attr 2=2 @attr gils 1=2040 @attr 4=109 48", 1));