t: replace variable root directory in tests
[perl/plp/.git] / t / 50-cgi.t
index 09ebd0b1dc1be03cb37c682fbdaed12392b3d71d..ed39da5a1fc38f53c176a885d357c16383287f4e 100644 (file)
@@ -1,7 +1,6 @@
 use strict;
 use warnings;
 
-use Cwd;
 use File::Basename qw( dirname );
 use File::Spec;
 use Test::More tests => 25;
@@ -13,7 +12,6 @@ $PLP::use_cache = 0 if $PLP::use_cache;
 
 chdir File::Spec->catdir(dirname($0), '50-cgi')
        or BAIL_OUT('cannot change to test directory ./50-cgi/');
-my $ORGDIR = '.'; # Cwd::getcwd();
 
 # 0*: permission checks using generated dummy files
 SKIP:
@@ -47,7 +45,7 @@ plp_ok($_) for glob '[12]*.html';
 SKIP: {
        my @inctests = glob '3*.html';
 
-       my $INCFILE = File::Spec->rel2abs("$ORGDIR/missinginclude");
+       my $INCFILE = File::Spec->rel2abs("./missinginclude");
        if (open my $dummy, "<", $INCFILE) {  # like PLP::source will
                fail("file missinginclude shouldn't exist");
                skip("missinginclude tests (3*)", @inctests - 1);
@@ -80,7 +78,7 @@ plp_ok($_, -env => {
        GATEWAY_INTERFACE => 'CGI/1.1',
        
        SCRIPT_NAME => "/$_", #XXX: .plp?
-       SCRIPT_FILENAME => "$ORGDIR/$_",
+       SCRIPT_FILENAME => "./$_",
        PATH_INFO => '/test/123',
        PATH_TRANSLATED => undef,
        DOCUMENT_ROOT => undef,