Start adding test cases involving quotes. The first two I could think of

both fail...


git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@552 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
Dag-Erling Smørgrav 2012-04-01 20:59:45 +00:00
parent 81455d2603
commit 9a14604cd2
1 changed files with 31 additions and 0 deletions

View File

@ -341,6 +341,35 @@ T_FUNC(two_words, "two words")
return (ret);
}
/***************************************************************************
* Complex cases
*/
T_FUNC(empty_single_quotes, "empty single quotes")
{
int ret;
orw_open();
orw_output("''\n");
orw_rewind();
ret = orw_expect("", 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
orw_close();
return (ret);
}
T_FUNC(empty_double_quotes, "empty double quotes")
{
int ret;
orw_open();
orw_output("\"\"\n");
orw_rewind();
ret = orw_expect("", 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
orw_close();
return (ret);
}
const struct t_test *t_plan[] = {
@ -358,6 +387,8 @@ const struct t_test *t_plan[] = {
T(comment_after_word),
T(word_containing_hash),
T(two_words),
T(empty_single_quotes),
T(empty_double_quotes),
NULL
};