projects
/
idzebra-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Bump copyright year
[idzebra-moved-to-github.git]
/
test
/
api
/
test_insert_fetch.c
diff --git
a/test/api/test_insert_fetch.c
b/test/api/test_insert_fetch.c
index
17e085f
..
92fef14
100644
(file)
--- a/
test/api/test_insert_fetch.c
+++ b/
test/api/test_insert_fetch.c
@@
-1,5
+1,5
@@
/* This file is part of the Zebra server.
/* This file is part of the Zebra server.
- Copyright (C) 1994-2009 Index Data
+ Copyright (C) 2004-2013 Index Data
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Zebra is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
@@
-19,6
+19,9
@@
Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
/* insert a small pile of records, search and fetch them */
/* insert a small pile of records, search and fetch them */
+#if HAVE_CONFIG_H
+#include <config.h>
+#endif
#include "testlib.h"
const char *myrec[] = {
#include "testlib.h"
const char *myrec[] = {
@@
-26,7
+29,7
@@
const char *myrec[] = {
" <title>My title</title>\n"
"</gils>\n",
0};
" <title>My title</title>\n"
"</gils>\n",
0};
-
+
#define NUMBER_TO_FETCH_MAX 1000
static void tst(int argc, char **argv)
#define NUMBER_TO_FETCH_MAX 1000
static void tst(int argc, char **argv)
@@
-62,12
+65,12
@@
static void tst(int argc, char **argv)
ZebraRetrievalRecord retrievalRecord[NUMBER_TO_FETCH_MAX];
char setname[20];
int j;
ZebraRetrievalRecord retrievalRecord[NUMBER_TO_FETCH_MAX];
char setname[20];
int j;
- ODR odr_input = odr_createmem(ODR_DECODE);
- ODR odr_output = odr_createmem(ODR_DECODE);
+ ODR odr_input = odr_createmem(ODR_DECODE);
+ ODR odr_output = odr_createmem(ODR_DECODE);
YAZ_PQF_Parser parser = yaz_pqf_create();
Z_RPNQuery *query = yaz_pqf_parse(parser, odr_input, "@attr 1=4 my");
zint hits;
YAZ_PQF_Parser parser = yaz_pqf_create();
Z_RPNQuery *query = yaz_pqf_parse(parser, odr_input, "@attr 1=4 my");
zint hits;
-
+
sprintf(setname, "s%d", i+1);
ret = zebra_search_RPN(zh, odr_input, query, setname, &hits);
if (ret != ZEBRA_OK)
sprintf(setname, "s%d", i+1);
ret = zebra_search_RPN(zh, odr_input, query, setname, &hits);
if (ret != ZEBRA_OK)
@@
-78,7
+81,7
@@
static void tst(int argc, char **argv)
}
if (hits != number_to_be_inserted)
{
}
if (hits != number_to_be_inserted)
{
- yaz_log(YLOG_WARN, "Unexpected hit count " ZINT_FORMAT
+ yaz_log(YLOG_WARN, "Unexpected hit count " ZINT_FORMAT
"(should be %d)", hits, number_to_be_inserted);
exit(1);
}
"(should be %d)", hits, number_to_be_inserted);
exit(1);
}
@@
-102,7
+105,7
@@
static void tst(int argc, char **argv)
code);
exit(1);
}
code);
exit(1);
}
-
+
for (j = 0; j < number_to_fetch; j++)
{
if (!retrievalRecord[j].buf)
for (j = 0; j < number_to_fetch; j++)
{
if (!retrievalRecord[j].buf)
@@
-129,6
+132,7
@@
TL_MAIN
/*
* Local variables:
* c-basic-offset: 4
/*
* Local variables:
* c-basic-offset: 4
+ * c-file-style: "Stroustrup"
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab
* indent-tabs-mode: nil
* End:
* vim: shiftwidth=4 tabstop=8 expandtab