+
+ wrbuf_rewind(wr);
+ wrbuf_puts(wr, "1234");
+ wrbuf_insert(wr, 0, "abc", 3);
+ YAZ_CHECK(!strcmp(wrbuf_cstr(wr), "abc1234"));
+
+ wrbuf_rewind(wr);
+ wrbuf_puts(wr, "1234");
+ wrbuf_insert(wr, 1, "abc", 3);
+ YAZ_CHECK(!strcmp(wrbuf_cstr(wr), "1abc234"));
+
+ wrbuf_rewind(wr);
+ wrbuf_puts(wr, "1234");
+ wrbuf_insert(wr, 4, "abc", 3);
+ YAZ_CHECK(!strcmp(wrbuf_cstr(wr), "1234abc"));
+
+ wrbuf_rewind(wr);
+ wrbuf_puts(wr, "1234");
+ wrbuf_insert(wr, 5, "abc", 3);
+ YAZ_CHECK(!strcmp(wrbuf_cstr(wr), "1234"));
+
+ YAZ_CHECK(sha1_test(wr,
+ "Hello world\n",
+ "33ab5639bfd8e7b95eb1d8d0b87781d4ffea4d5d"));
+
+#if YAZ_POSIX_THREADS
+ thread_testing();
+#endif