DataMuseum.dk

Presents historical artifacts from the history of:

DKUUG/EUUG Conference tapes

This is an automatic "excavation" of a thematic subset of
artifacts from Datamuseum.dk's BitArchive.

See our Wiki for more about DKUUG/EUUG Conference tapes

Excavated with: AutoArchaeologist - Free & Open Source Software.


top - metrics - download
Index: T a

⟦cca93a394⟧ TextFile

    Length: 899 (0x383)
    Types: TextFile
    Names: »argv.t«

Derivation

└─⟦4f9d7c866⟧ Bits:30007245 EUUGD6: Sikkerheds distributionen
    └─⟦b5330643c⟧ »./cops/perl-4.019/perl.tar.Z« 
        └─⟦2b9a58213⟧ 
            └─⟦this⟧ »perl-4.019/t/io/argv.t« 

TextFile

#!./perl

# $Header: argv.t,v 4.0 91/03/20 01:50:46 lwall Locked $

print "1..5\n";

open(try, '>Io.argv.tmp') || (die "Can't open temp file.");
print try "a line\n";
close try;

$x = `./perl -e 'while (<>) {print \$.,\$_;}' Io.argv.tmp Io.argv.tmp`;

if ($x eq "1a line\n2a line\n") {print "ok 1\n";} else {print "not ok 1\n";}

$x = `echo foo|./perl -e 'while (<>) {print $_;}' Io.argv.tmp -`;

if ($x eq "a line\nfoo\n") {print "ok 2\n";} else {print "not ok 2\n";}

$x = `echo foo|./perl -e 'while (<>) {print $_;}'`;

if ($x eq "foo\n") {print "ok 3\n";} else {print "not ok 3 :$x:\n";}

@ARGV = ('Io.argv.tmp', 'Io.argv.tmp', '/dev/null', 'Io.argv.tmp');
while (<>) {
    $y .= $. . $_;
    if (eof()) {
	if ($. == 3) {print "ok 4\n";} else {print "not ok 4\n";}
    }
}

if ($y eq "1a line\n2a line\n3a line\n")
    {print "ok 5\n";}
else
    {print "not ok 5\n";}

`/bin/rm -f Io.argv.tmp`;