From: Adam Dickmeiss Date: Wed, 8 Nov 2006 13:05:33 +0000 (+0000) Subject: Changed test to that bfs is reconstructed after bfs_reset. X-Git-Tag: ZEBRA.2.0.6~65 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=1bf3c420dad254b9b0275f28541772e28197e19f Changed test to that bfs is reconstructed after bfs_reset. --- diff --git a/bfile/tstbfile2.c b/bfile/tstbfile2.c index 0b221c9..44ab3ca 100644 --- a/bfile/tstbfile2.c +++ b/bfile/tstbfile2.c @@ -1,4 +1,4 @@ -/* $Id: tstbfile2.c,v 1.1 2006-11-08 12:59:27 adam Exp $ +/* $Id: tstbfile2.c,v 1.2 2006-11-08 13:05:33 adam Exp $ Copyright (C) 1995-2006 Index Data ApS @@ -67,6 +67,19 @@ void tst(void) bf_reset(bfs); +#if 1 + /* we have to destroy bfs after reset. Unfortunately! */ + bfs_destroy(bfs); + + bfs = bfs_create("register:4M", 0 /* base: current dir */); + YAZ_CHECK(bfs); + if (!bfs) + return; + + r = bf_cache(bfs, "shadow:4M"); + YAZ_CHECK_EQ(r, ZEBRA_OK); +#endif + bf = bf_open(bfs, "file", block_size, 1); YAZ_CHECK(bf); if (bf)