projects
/
yaz-moved-to-github.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
ZOOM Z39.50 handling: refactor
[yaz-moved-to-github.git]
/
test
/
test_wrbuf.c
diff --git
a/test/test_wrbuf.c
b/test/test_wrbuf.c
index
644f52a
..
e7886c4
100644
(file)
--- a/
test/test_wrbuf.c
+++ b/
test/test_wrbuf.c
@@
-76,6
+76,15
@@
static void tstwrbuf(void)
wrbuf_insert(wr, 5, "abc", 3);
YAZ_CHECK(!strcmp(wrbuf_cstr(wr), "1234"));
wrbuf_insert(wr, 5, "abc", 3);
YAZ_CHECK(!strcmp(wrbuf_cstr(wr), "1234"));
+#if HAVE_GCRYPT_H
+ {
+ const char *msg = "Hello world\n";
+ wrbuf_rewind(wr);
+ wrbuf_sha1_write(wr, msg, strlen(msg), 1);
+ YAZ_CHECK(!strcmp(wrbuf_cstr(wr),
+ "33ab5639bfd8e7b95eb1d8d0b87781d4ffea4d5d"));
+ }
+#endif
wrbuf_destroy(wr);
}
wrbuf_destroy(wr);
}