diff options
Diffstat (limited to 'test-line-buffer.c')
-rw-r--r-- | test-line-buffer.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/test-line-buffer.c b/test-line-buffer.c index ec19b13ee2..19bf2d4403 100644 --- a/test-line-buffer.c +++ b/test-line-buffer.c @@ -3,6 +3,7 @@ */ #include "git-compat-util.h" +#include "strbuf.h" #include "vcs-svn/line_buffer.h" static uint32_t strtouint32(const char *s) @@ -17,6 +18,15 @@ static uint32_t strtouint32(const char *s) static void handle_command(const char *command, const char *arg, struct line_buffer *buf) { switch (*command) { + case 'b': + if (!prefixcmp(command, "binary ")) { + struct strbuf sb = STRBUF_INIT; + strbuf_addch(&sb, '>'); + buffer_read_binary(buf, &sb, strtouint32(arg)); + fwrite(sb.buf, 1, sb.len, stdout); + strbuf_release(&sb); + return; + } case 'c': if (!prefixcmp(command, "copy ")) { buffer_copy_bytes(buf, strtouint32(arg)); |