From 8e2615421d8d626f08022d92269fd65632b4ec41 Mon Sep 17 00:00:00 2001 From: Nir Soffer Date: Tue, 7 Jun 2011 03:15:51 +0300 Subject: Add failing test for evbuffer_search_range. --- test/regress_buffer.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'test/regress_buffer.c') diff --git a/test/regress_buffer.c b/test/regress_buffer.c index 9c4b47c7..2e5efeb1 100644 --- a/test/regress_buffer.c +++ b/test/regress_buffer.c @@ -1280,6 +1280,10 @@ test_evbuffer_search(void *ptr) pos = evbuffer_search_range(buf, "ack", 3, NULL, &end); tt_int_op(pos.pos, ==, -1); + /* Set "end" to the last byte in the buffer. */ + evbuffer_ptr_set(buf, &end, 17, EVBUFFER_PTR_SET); + pos = evbuffer_search_range(buf, "attack", 6, NULL, &end); + tt_int_op(pos.pos, ==, 11); end: if (buf) -- cgit v1.2.1