File: inode_names.t

package info (click to toggle)
libapache-asp-perl 2.63-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 4,120 kB
  • sloc: perl: 6,044; php: 409; sh: 62; lisp: 22; makefile: 10
file content (30 lines) | stat: -rw-r--r-- 848 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
use Apache::ASP::CGI;
&Apache::ASP::CGI::do_self(NoState => 1, InodeNames => 0, UseStrict => 1);

__END__
<% 
use File::Basename qw(basename);
use strict;

my $ASP = $Server->{asp};
my $file_id1 = $ASP->FileId(basename($Server->File));
$t->eok(sub { $file_id1 =~ /^__ASP_inode_names_tx.{32}$/ }, "basename FileId()");

my $file_id2 = $ASP->FileId('abc'x200);
$t->eok(sub { $file_id2 =~ /abcx/ and length($file_id1) < 120 }, "long name FileId()");

my $file_id3 = '';
if(my $stat = (stat('.'))[1]) {

    # need both here, inode_names is not cached at new() time
    $ASP->{r}->dir_config->set('InodeNames', 1);
    $ASP->{inode_names} = 1;

    $file_id3 = $ASP->FileId(basename($Server->File));
    $t->eok(sub { $file_id3 =~ /DEV.+_INODE.+/ }, "InodeNames FileId()");
}

$t->eok(length($ASP->{compile_checksum}) == 32, "Compile Checksum");

%>