From 1e3740645e4483eef801702b2c8d727638f1d86d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dag-Erling=20Sm=C3=B8rgrav?= Date: Tue, 28 Oct 2014 13:48:00 +0000 Subject: [PATCH] Add a test case for line continuation within whitespace, similar to the corresponding test in t_openpam_readword. git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@835 185d5e19-27fe-0310-9dcf-9bff6b9f3609 --- t/t_openpam_readlinev.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/t/t_openpam_readlinev.c b/t/t_openpam_readlinev.c index a644abd..ff33b4e 100644 --- a/t/t_openpam_readlinev.c +++ b/t/t_openpam_readlinev.c @@ -223,6 +223,20 @@ T_FUNC(whitespace_before_comment, "whitespace before comment") return (ret); } +T_FUNC(line_continuation_within_whitespace, "line continuation within whitespace") +{ + struct t_file *tf; + int ret; + + tf = t_fopen(NULL); + t_fprintf(tf, " \\\n \n"); + t_frewind(tf); + ret = orlv_expect(tf, empty, 2 /*lines*/, 0 /*eof*/) && + orlv_expect(tf, NULL, 0 /*lines*/, 1 /*eof*/); + t_fclose(tf); + return (ret); +} + /*************************************************************************** * Simple words @@ -295,6 +309,7 @@ static const struct t_test *t_plan[] = { T(whitespace), T(comment), T(whitespace_before_comment), + T(line_continuation_within_whitespace), T(one_word), T(two_words),