Changeset 552 in openpam


Ignore:
Timestamp:
Apr 1, 2012, 8:59:45 PM (3 years ago)
Author:
des
Message:

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

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/t/t_openpam_readword.c

    r551 r552  
    346346
    347347
     348/***************************************************************************
     349 * Complex cases
     350 */
     351
     352T_FUNC(empty_single_quotes, "empty single quotes")
     353{
     354        int ret;
     355
     356        orw_open();
     357        orw_output("''\n");
     358        orw_rewind();
     359        ret = orw_expect("", 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     360        orw_close();
     361        return (ret);
     362}
     363
     364T_FUNC(empty_double_quotes, "empty double quotes")
     365{
     366        int ret;
     367
     368        orw_open();
     369        orw_output("\"\"\n");
     370        orw_rewind();
     371        ret = orw_expect("", 0 /*lines*/, 0 /*eof*/, 1 /*eol*/);
     372        orw_close();
     373        return (ret);
     374}
     375
     376
     377
    348378
    349379const struct t_test *t_plan[] = {
     
    362392        T(word_containing_hash),
    363393        T(two_words),
     394        T(empty_single_quotes),
     395        T(empty_double_quotes),
    364396        NULL
    365397};
Note: See TracChangeset for help on using the changeset viewer.