From 854decc4f10548127aa2814d83b014826fc47f1f Mon Sep 17 00:00:00 2001 From: Enno Rehling Date: Wed, 3 Oct 2018 10:37:34 +0200 Subject: [PATCH] comments split by a backslash are not handled right. --- src/util/order_parser.test.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/util/order_parser.test.c b/src/util/order_parser.test.c index 630bcc4d4..1034e3d0a 100644 --- a/src/util/order_parser.test.c +++ b/src/util/order_parser.test.c @@ -32,11 +32,17 @@ static void test_parse_orders(CuTest *tc) { OP_SetUserData(parser, lastline); OP_SetOrderHandler(parser, copy_line); CuAssertPtrNotNull(tc, parser); + lastline[0] = 0; CuAssertIntEquals(tc, OP_STATUS_OK, OP_Parse(parser, "Hello World", 11, 1)); CuAssertStrEquals(tc, "Hello World", lastline); OP_ParserReset(parser); + lastline[0] = 0; + CuAssertIntEquals(tc, OP_STATUS_OK, OP_Parse(parser, "Hello World;\nError", 18, 1)); + CuAssertStrEquals(tc, "Hello World", lastline); + OP_ParserReset(parser); + lastline[0] = 0; CuAssertIntEquals(tc, OP_STATUS_OK, OP_Parse(parser, "Hello World\n", 12, 1)); CuAssertStrEquals(tc, "Hello World", lastline);