-/* $Id: t11.c,v 1.5 2006-05-10 08:13:35 adam Exp $
- Copyright (C) 1995-2005
+/* $Id: t11.c,v 1.8 2006-09-15 10:44:34 adam Exp $
+ Copyright (C) 1995-2006
Index Data ApS
This file is part of the Zebra server.
for more details.
You should have received a copy of the GNU General Public License
-along with Zebra; see the file LICENSE.zebra. If not, write to the
-Free Software Foundation, 59 Temple Place - Suite 330, Boston, MA
-02111-1307, USA.
+along with this program; if not, write to the Free Software
+Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
*/
/** testing of scan */
YAZ_CHECK(tl_init_data(zh, myrec));
+ /*
+ int tl_scan
+ (
+ ZebraHandle zh, const char *query,
+ int pos, int num,
+ int exp_pos, int exp_num, int exp_partial,
+ const char **exp_entries
+ )
+ */
+
+ if (1)
+ {
+ /* bad string use attrite, bug #647 */
+ YAZ_CHECK(tl_scan(zh, "@attr 1=bad 0", 1, 1, 1, 1, 0, 0));
+ }
+ if (1)
+ {
+ /* bad numeric use attributes, bug #647 */
+ YAZ_CHECK(tl_scan(zh, "@attr 1=1234 0", 1, 1, 1, 1, 0, 0));
+ }
if (1)
{
/* scan before. nothing must be returned */
if (1)
{
/* scan after. nothing must be returned */
- YAZ_CHECK(tl_scan(zh, "@attr 1=4 m", 1, 1, 1, 0, 1, 0));
+ const char *ent[] = { 0 };
+ YAZ_CHECK(tl_scan(zh, "@attr 1=4 m", 1, 1, 1, 0, 1, ent));
}
if (1)
{
}
if (1)
{
- YAZ_CHECK(tl_scan(zh, "@attr 1=4 z", -22, 10, -22, 0, 1, 0));
+ const char *ent[] = { 0 };
+ YAZ_CHECK(tl_scan(zh, "@attr 1=4 z", -22, 10, -22, 0, 1, ent));
}
YAZ_CHECK(tl_close_down(zh, zs));
}