X-Git-Url: http://git.indexdata.com/?a=blobdiff_plain;f=test%2Fapi%2Ftest_sortidx.c;h=908fd8a78cc1c18b4df5b4d3150f43b3ec2acdb5;hb=250de4ed23a44f5eb3552db317eef0d0fbe3265c;hp=eefcfe2fb18d26d634dac66c92acaa8ec4913b4f;hpb=6a0f9234f945bc4956e2bcef75f715661a9eba9a;p=idzebra-moved-to-github.git diff --git a/test/api/test_sortidx.c b/test/api/test_sortidx.c index eefcfe2..908fd8a 100644 --- a/test/api/test_sortidx.c +++ b/test/api/test_sortidx.c @@ -1,5 +1,5 @@ /* 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 @@ -17,6 +17,9 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */ +#if HAVE_CONFIG_H +#include +#endif #include #include #include "testlib.h" @@ -92,16 +95,16 @@ static void tst2(zebra_sort_index_t si) WRBUF w2 = wrbuf_alloc(); zebra_sort_sysno(si, sysno); YAZ_CHECK_EQ(zebra_sort_read(si, 0, w2), 0); - + for (i = 0; i < 600; i++) /* 600 * 6 < max size =4K */ wrbuf_write(w1, "12345", 6); - + zebra_sort_add(si, input_section_id, w1); - + zebra_sort_sysno(si, sysno); - + YAZ_CHECK_EQ(zebra_sort_read(si, &output_section_id, w2), 1); - + YAZ_CHECK_EQ(wrbuf_len(w1), wrbuf_len(w2)); YAZ_CHECK(!memcmp(wrbuf_buf(w1), wrbuf_buf(w2), wrbuf_len(w2))); YAZ_CHECK_EQ(input_section_id, output_section_id);