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
Added sort test.
[idzebra-moved-to-github.git]
/
test
/
sort
/
sort1.c
diff --git
a/test/sort/sort1.c
b/test/sort/sort1.c
index
1aa46ec
..
435a22d
100644
(file)
--- a/
test/sort/sort1.c
+++ b/
test/sort/sort1.c
@@
-1,8
+1,5
@@
-/* $Id: sort1.c,v 1.10 2006-08-14 10:40:30 adam Exp $
- Copyright (C) 1995-2006
- Index Data ApS
-
-This file is part of the Zebra server.
+/* This file is part of the Zebra server.
+ Copyright (C) 1995-2008 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
@@
-30,7
+27,7
@@
static void tst(int argc, char **argv)
char path[256];
int i;
char path[256];
int i;
- YAZ_CHECK(zebra_select_database(zh, "Default") == ZEBRA_OK);
+ YAZ_CHECK_EQ(zebra_select_database(zh, "Default"), ZEBRA_OK);
zebra_init(zh);
zebra_init(zh);
@@
-48,18
+45,21
@@
static void tst(int argc, char **argv)
ids[2] = 4;
ids[3] = 5;
YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=30 0", 4, ids));
ids[2] = 4;
ids[3] = 5;
YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=30 0", 4, ids));
+ YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=Date 0", 4, ids));
ids[0] = 5;
ids[1] = 4;
ids[2] = 2;
ids[3] = 3;
YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=1021 0", 4, ids));
ids[0] = 5;
ids[1] = 4;
ids[2] = 2;
ids[3] = 3;
YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=1021 0", 4, ids));
+ YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=Bib-Level 0", 4, ids));
ids[0] = 2;
ids[1] = 5;
ids[2] = 4;
ids[3] = 3;
YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=1021 @attr 4=109 0", 4, ids));
ids[0] = 2;
ids[1] = 5;
ids[2] = 4;
ids[3] = 3;
YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=1021 @attr 4=109 0", 4, ids));
+ YAZ_CHECK(tl_sort(zh, "@or @attr 1=4 computer @attr 7=1 @attr 1=Bib-Level @attr 4=109 0", 4, ids));
YAZ_CHECK(tl_close_down(zh, zs));
}
YAZ_CHECK(tl_close_down(zh, zs));
}