CGI-Cookie-XS

 view release on metacpan or  search on metacpan

t/01-sanity.t  view on Meta::CPAN

#use CGI::Cookie::XS;

use t::TestCookie;

plan tests => 1 * blocks();

#test 'CGI::Cookie';
no_diff;

run_tests;

__DATA__

=== TEST 1: complex cookie
--- cookie
foo=a%20phrase;haha; bar=yes%2C%20a%20phrase; baz=%5Ewibble&leiyh; qux=%27
--- out
$VAR1 = {
          'bar' => [
                     'yes, a phrase'
                   ],
          'baz' => [
                     '^wibble',
                     'leiyh'
                   ],
          'foo' => [
                     'a phrase'
                   ],
          'qux' => [
                     '\''
                   ]
        };



=== TEST 2: foo=
--- cookie
foo=
--- out
$VAR1 = {
          'foo' => []
        };



=== TEST 3: foo
--- cookie
foo
--- out
$VAR1 = {};



=== TEST 4: foo bar
--- cookie
foo bar
--- out
$VAR1 = {};



=== TEST 5: &
--- cookie
&
--- out
$VAR1 = {};



( run in 3.009 seconds using v1.01-cache-2.11-cpan-5c0b1e786e0 )