comments split by a backslash are not handled right.

This commit is contained in:
Enno Rehling 2018-10-03 10:37:34 +02:00
parent 6c1d266c12
commit 854decc4f1

View file

@ -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);