Plan 9 from Bell Labs’s /usr/web/sources/contrib/gabidiaz/root/sys/src/cmd/perl/lib/SelectSaver.t

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!./perl

BEGIN {
    chdir 't' if -d 't';
    @INC = '../lib';
}

print "1..3\n";

use SelectSaver;

open(FOO, ">foo-$$") || die;

print "ok 1\n";
{
    my $saver = new SelectSaver(FOO);
    print "foo\n";
}

# Get data written to file
open(FOO, "foo-$$") || die;
chomp($foo = <FOO>);
close FOO;
unlink "foo-$$";

print "ok 2\n" if $foo eq "foo";

print "ok 3\n";

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.