richter     01/08/13 21:10:36

  Modified:    .        test.pl
  Added:       test/cmp getsdaturlsess.htm setsdaturlsess.htm
               test/html/sidurl getsdaturlsess.htm setsdaturlsess.htm
  Log:
  more session tests
  
  Revision  Changes    Path
  1.111     +10 -1     embperl/test.pl
  
  Index: test.pl
  ===================================================================
  RCS file: /home/cvs/embperl/test.pl,v
  retrieving revision 1.110
  retrieving revision 1.111
  diff -u -r1.110 -r1.111
  --- test.pl   2001/08/13 10:53:44     1.110
  +++ test.pl   2001/08/14 04:10:36     1.111
  @@ -11,7 +11,7 @@
   #   IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED
   #   WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE.
   #
  -#   $Id: test.pl,v 1.110 2001/08/13 10:53:44 richter Exp $
  +#   $Id: test.pl,v 1.111 2001/08/14 04:10:36 richter Exp $
   #
   ###################################################################################
   
  @@ -535,6 +535,15 @@
           'cookie'     => 'url',
           'query_info' => 'foo=1',
           'aliasdir'   => 1,
  +        },
  +    'sidurl/setsdaturlsess.htm' => { 
  +        'offline'    => 0,
  +        'query_info' => 'sdat=99',
  +        'cookie'     => 'expectnew,url,nocookie',
  +        },
  +    'sidurl/getsdaturlsess.htm' => {
  +        'offline'    => 0,
  +        'cookie'     => 'expectnew,url',
           },
       'EmbperlObject/epopage1.htm' => {
           'offline'    => 0,
  
  
  
  1.1                  embperl/test/cmp/getsdaturlsess.htm
  
  Index: getsdaturlsess.htm
  ===================================================================
  <html>
  <head>
  <title>Tests for Embperl - Get State Session Data</title>
  </head>
  
  
  <body>
  
  
        fdat:<br>
        <table></table>
  
        sdat:<br> 
        <table>
                <tr>
                        <td>sdat</td><td>99</td>
                </tr>
        </table>
  
        ok (num=1)<p>
  
  ^     <a href=\"cont\.htm\?EMBPERL_UID=[a-f0-9]+\">continue</a>
  ^     <a href=\"cont.htm\?q=1&EMBPERL_UID=[a-f0-9]+\">continue</a>
  ^     <a href=\"cont.htm\?q=1&b=2&EMBPERL_UID=[a-f0-9]+\">continue</a>
        <form action="cont.htm">
  ^     <input type=\"hidden\" name=\"EMBPERL_UID\" value=\"[a-f0-9]+\"></form>
  
  </body>
  </html>
  
  
  
  
  1.1                  embperl/test/cmp/setsdaturlsess.htm
  
  Index: setsdaturlsess.htm
  ===================================================================
  <html>
  <head>
  <title>Tests for Embperl - Set State Session Data</title>
  </head>
  
  
  <body>
  
  
        fdat:<br>
        <table>
                <tr>
                        <td>sdat</td><td>99</td>
                </tr>
        </table>
  
        sdat:<br> 
        <table></table>
  
        ok (num=1)<p>
  
  ^     <a href=\"cont\.htm\?EMBPERL_UID=[a-f0-9]+\">continue</a>
  ^     <a href=\"cont.htm\?q=1&EMBPERL_UID=[a-f0-9]+\">continue</a>
  ^     <a href=\"cont.htm\?q=1&b=2&EMBPERL_UID=[a-f0-9]+\">continue</a>
        <form action="cont.htm">
  ^     <input type=\"hidden\" name=\"EMBPERL_UID\" value=\"[a-f0-9]+\"></form>
  
  </body>
  </html>
  
  
  
  
  1.1                  embperl/test/html/sidurl/getsdaturlsess.htm
  
  Index: getsdaturlsess.htm
  ===================================================================
  <html>
  <head>
  <title>Tests for Embperl - Get State Session Data</title>
  </head>
  
  
  <body>
  
  
        fdat:<br>
        [- @ks = sort keys %fdat -]
  
        <table>
                <tr>
                        <td>[+ $ks[$row] +]</td><td>[+ $fdat{$ks[$row] || ''} +]</td>
                </tr>
        </table>
  
        sdat:<br> 
        [- $off = 0 ; $off-- if ($HTML::Embperl::SessionMgnt == 2 && !defined (tied 
(%sdat) -> getid)) ; -]
        [- @ks = grep (!/^_/, sort (keys %sdat)) ; $num = keys (%sdat) - $#ks - 1 + 
$off -]
  
        <table>
                <tr>
                        <td>[+ $ks[$row] +]</td><td>[+ $sdat{$ks[$row] || ''} +]</td>
                </tr>
        </table>
  
        [+ $num > 0?"ok (num=$num)":"Not a session hash (num=$num)" +]<p>
  
        <a href="cont.htm">continue</a>
        <a href="cont.htm?q=1">continue</a>
        <a href="cont.htm?q=1&b=2">continue</a>
        <form action="cont.htm">
        </form>
  
  </body>
  </html>
  
  
  
  1.1                  embperl/test/html/sidurl/setsdaturlsess.htm
  
  Index: setsdaturlsess.htm
  ===================================================================
  <html>
  <head>
  <title>Tests for Embperl - Set State Session Data</title>
  </head>
  
  
  <body>
  
  
        fdat:<br>
        [- @ks = sort keys %fdat -]
  
        <table>
                <tr>
                        <td>[+ $ks[$row] +]</td><td>[+ $fdat{$ks[$row] || ''} +]</td>
                </tr>
        </table>
  
        sdat:<br> 
        [- $off = 0 ; $off-- if ($HTML::Embperl::SessionMgnt == 2 && !defined (tied 
(%sdat) -> getid)) ; -]
        [- @ks = grep (!/^_/, sort (keys %sdat)) ; $num = keys (%sdat) - $#ks - 1 + 
$off -]
  
        <table>
                <tr>
                        <td>[+ $ks[$row] +]</td><td>[+ $sdat{$ks[$row] || ''} +]</td>
                </tr>
        </table>
  
        [+ $num > 0?"ok (num=$num)":"Not a session hash (num=$num)" +]<p>
  
        [- 
        while (($k, $v) = each (%fdat))
                {
                $sdat{$k} = $fdat{$k} ;
                }
        -]
  
  
        <a href="cont.htm">continue</a>
        <a href="cont.htm?q=1">continue</a>
        <a href="cont.htm?q=1&b=2">continue</a>
        <form action="cont.htm">
        </form>
  
  </body>
  </html>
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to