makepp

 view release on metacpan or  search on metacpan

t/additional_tests/spar_unix.test  view on Meta::CPAN

###	SPAR <http://www.cpan.org/scripts/>
###	2	644	1380406064	1380406064	hint
This tests the spar utility that is only used for packaging tests.
Failure has nothing to do with makepp.
###	13	444	1120166745	1501106800	is_relevant.pl
# This tests spar itself, and not any makepp functionality.  The test is
# integrated here because spar is hosted in the test section of makepp (for
# which it was originally conceived.)

# FreeBSD 4.10 and Darwin 5.5 allow truncating a write protected file :-(
die if open my $fh, '>', 'd.spar';

$] ge '5.01' and
# Can we chmod on this fs?
((stat 'd.spar')[2] & 0777) == 0444 and
  chmod 0650, 'd.spar' and
# chmod fails with success on Samba.
  ((stat 'd.spar')[2] & 0777) == 0650;
###	28	755	1079987495	1079987351	makepp_test_script
#!/bin/sh -x

unset LANG LC_MESSAGES LC_ALL
PATH=..:../..:$PATH; export PATH
spar="${PERL-perl} -S spar"

$spar -e >spar-mode.el
$spar -p >un_spar.pl

$spar -x answers/dir.pl
$spar -c dir.pl dir

rm -fr dir
${PERL-perl} answers/dir.pl
$spar dir.spar dir
${PERL-perl} answers/dir.pl
$spar -a dir-a.spar dir
${PERL-perl} answers/dir.pl
$spar -d dir-d.spar dir

$spar -x d.spar
$spar -a dir-a.spar dir/d

rm -fr dir/a
chmod a-w dir/b dir
echo junk line >>dir.spar
$spar -x dir.spar 2>errors
chmod u+w dir/b dir
###	4	444	1079987495	1079872464	d.spar
###	SPAR <http://www.cpan.org/scripts/>
###	D	755	1079872401	1079870636	dir/d/
###	1	644	1079872401	1079872401	dir/d/d
ddd
###	D	755	1164319650	1079870636	.makepp/
###	3	644	1164319650	1190056091	.makepp/log
This is a dummy file present so as to satisfy makepp's test harness.

N_FILES000
###	D	755	1079988067	1079987490	answers/
###	67	755	1120163193	1366490088	answers/dir.pl
#! /usr/bin/env perl
# -*-spar-*-

# This file was generated by spar <http://www.cpan.org/scripts/>
# Run it with perl to unpack it.

    my( $lines, $kind, %dirs, $mode, %mode, $atime, $mtime, $name, $nl ) = (-1, 0);
    while( <DATA> ) {
	s/\r?\n$//;		# cross-plattform chomp
	if( $lines >= 0 ) {
	    print F $_, $lines ? "\n" : $nl;
	} elsif( $kind eq 'L' ) {
	    if( $mode eq 'S' ) {
		symlink $_, $name;



( run in 0.926 second using v1.01-cache-2.11-cpan-5c0b1e786e0 )