cvs commit: p5ee/App-Options/t main.t

[email protected] (Stephen Adkins)
Newsgroups perl.cvs.p5ee
Message-ID <[email protected]>
cvsuser     04/12/28 14:31:23

  Modified:    App-Options/t main.t
  Log:
  env var substitution tests
  
  Revision  Changes    Path
  1.6       +7 -0      p5ee/App-Options/t/main.t
  
  Index: main.t
  ===================================================================
  RCS file: /cvs/public/p5ee/App-Options/t/main.t,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- main.t	2 Dec 2004 16:00:14 -0000	1.5
  +++ main.t	28 Dec 2004 22:31:23 -0000	1.6
  @@ -4,6 +4,8 @@
       $ENV{VAR10} = "value10";
       $ENV{APP_VAR11} = "value11";
       $ENV{VAR12} = "value12";
  +    $ENV{ZZ} = "zz";
  +    $ENV{APP_PLUGH} = "twisty passages";
       delete $ENV{PREFIX};
       delete $ENV{DOCUMENT_ROOT};
   }
  @@ -81,11 +83,16 @@
   is($App::options3{var1}, "pattern match", "pattern match");
   is($App::options3{var2}, "old pattern match", "old pattern match");
   
  +# hostname/host tests
   ok($App::options{hostname}, "hostname option set");
   ok($App::options{host}, "host option set");
   ok(length($App::options{host}) <= length($App::options{hostname}) && $App::options{host} !~ /\./,
       "host option shorter than hostname option");
   ok(! defined $App::options{hosttest}, "host not named xyzzy3");
   
  +# $ENV{X} variable substitution tests
  +ok($App::options{envtest} eq "xyzzy", "\$ENV{X} variable substitution worked");
  +ok($App::options{plugh} eq "twisty passages", "auto-import of APP_ env vars worked");
  +
   exit 0;
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.