head 1.1; branch 1.1.1; access ; symbols ePerl_2_2_14:1.1.1.1 RSE:1.1.1; locks ; strict; comment @# @; 1.1 date 99.05.02.14.43.40; author rse; state Exp; branches 1.1.1.1; next ; 1.1.1.1 date 99.05.02.14.43.40; author rse; state Exp; branches ; next ; desc @@ 1.1 log @Initial revision @ text @## ## TEST.pl -- Test Suite utility functions ## Copyright (c) 1997 Ralf S. Engelschall, All Rights Reserved. ## package TEST; @@TMPFILES = (); $TMPFILECNT = 0; sub init { return; } sub tmpfile { local (*FP, $file); $file = "tmp." . sprintf("%02d", $TMPFILECNT++); push(@@TMPFILES, $file); if (@@_ != -1) { open(FP, ">$file"); print FP @@_; close(FP); } return $file; } sub tmpfile_with_name { local ($name) = shift @@_; local (*FP, $file); $file = $name; push(@@TMPFILES, $file); if (@@_ != -1) { open(FP, ">$file"); print FP @@_; close(FP); } return $file; } sub system { local ($cmd) = @@_; local ($rc); $rc = system($cmd); return $rc; } sub cleanup { foreach $file (@@TMPFILES) { unlink($file); } } 1; ##EOF## @ 1.1.1.1 log @Import of ePerl 2.2.14 @ text @@