Feersum

 view release on metacpan or  search on metacpan

t/psgi-26-input-getline.t  view on Meta::CPAN

}

is req(POST => '/sep', 'aXXbXXc'), 'j=[aXX|bXX|c]',
    'plain-string $/ separator';

is req(POST => '/record', 'abcdefg'), 'j=[abc|def|g]',
    '$/ = \\N record mode, short final record';

is req(POST => '/para', "\npA1\npA2\n\n\npB tail"),
    'j=[pA1\\npA2\\n\\n|pB tail]',
    '$/ = "" paragraph mode skips leading and eats trailing newline runs';

is req(POST => '/mixed', "hdr\nrest of the body"),
    'g=[hdr\\n] rest=[rest of the body]',
    'getline and read() share one position';

like req(POST => '/conv', "first\nsecond"),
    qr/^str=\[Feersum::Connection::Reader=\w+\(0x[0-9a-f]+\)\] num=addr bool=1 g=\[first\\n\]\z/,
    'psgi.input stringifies and numifies like a plain ref; a bool test reads nothing';

is req(GET => '/empty'), 'eof=undef err=[]',



( run in 1.310 second using v1.01-cache-2.11-cpan-ac8be02dad9 )