- yaz_log(YLOG_LOG, "GOT (%.*s)", wrbuf_len(b), wrbuf_buf(b));
- wrbuf_free(b, 1);
+ {
+ WRBUF w = wrbuf_alloc();
+
+ wrbuf_rewind(w);
+ wrbuf_puts_escaped(w, buf);
+ yaz_log(YLOG_LOG, "input %s", wrbuf_cstr(w));
+
+ wrbuf_rewind(w);
+ wrbuf_write_escaped(w, wrbuf_buf(b), wrbuf_len(b));
+ yaz_log(YLOG_LOG, "got %s", wrbuf_cstr(w));
+
+ wrbuf_rewind(w);
+ wrbuf_puts_escaped(w, cmpbuf);
+ yaz_log(YLOG_LOG, "exp %s", wrbuf_cstr(w));
+
+ wrbuf_destroy(w);
+ }
+
+ wrbuf_destroy(b);