summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorVincent Sanders <vincent.sanders@collabora.co.uk>2012-07-05 18:52:08 (GMT)
committer Vincent Sanders <vincent.sanders@collabora.co.uk>2012-07-05 18:52:08 (GMT)
commit1c71d3e3cd593e69e04b200a968df3291c20b2de (patch)
tree5509c331dac3856951ca4ab6ede5cfd55e14c306
parentf0525adcd70cec983dcb7a25a772bb82b34e65b7 (diff)
downloadlibparserutils-1c71d3e3cd593e69e04b200a968df3291c20b2de.tar.gz
libparserutils-1c71d3e3cd593e69e04b200a968df3291c20b2de.tar.bz2
add simple insert test when an a is found in teh input stream
-rw-r--r--test/inputstream.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/test/inputstream.c b/test/inputstream.c
index 4c37098..d8c6454 100644
--- a/test/inputstream.c
+++ b/test/inputstream.c
@@ -61,6 +61,11 @@ int main(int argc, char **argv)
while (parserutils_inputstream_peek(stream, 0, &c, &clen) !=
PARSERUTILS_NEEDDATA) {
parserutils_inputstream_advance(stream, clen);
+ if (*c == 'a') {
+ assert(parserutils_inputstream_insert(stream,
+ (const uint8_t *) "hello!!!",
+ SLEN("hello!!!")) == PARSERUTILS_OK);
+ }
}
}