X-Git-Url: http://git.silcnet.org/gitweb/?p=runtime.git;a=blobdiff_plain;f=lib%2Fsilcutil%2Ftests%2Ftest_silcbuffmt.c;h=8eb191153da08f04ec0f5e76d75982f7dbfa07d3;hp=6e856e974e743e1b7f102104d18d0b224e172002;hb=4e1ff1a404339243481ef9d3e92e8547dde7a767;hpb=9fb2ddb0bedad21e0080d7e18d6917b8555c0f1b diff --git a/lib/silcutil/tests/test_silcbuffmt.c b/lib/silcutil/tests/test_silcbuffmt.c index 6e856e97..8eb19115 100644 --- a/lib/silcutil/tests/test_silcbuffmt.c +++ b/lib/silcutil/tests/test_silcbuffmt.c @@ -147,6 +147,17 @@ int main(int argc, char **argv) SILC_STR_END, SILC_STR_END) < 0) goto err; + SILC_LOG_DEBUG(("Print all lines")); + silc_snprintf(string, sizeof(string), + "Rfoo\n\n\nbazfoobar\nRbarfoofoo\nRbar\nbaz\nRbazfoo"); + silc_buffer_set(&buf, string, strlen(string)); + SILC_LOG_DEBUG(("string: %s", string)); + if (silc_buffer_unformat(&buf, + SILC_STR_REGEX("", SILC_STR_REGEX_NL), + SILC_STR_FUNC(print, NULL, NULL), + SILC_STR_END, SILC_STR_END) < 0) + goto err; + success = TRUE; err: