#! ./perl
######################### We start with some black magic to print on failure.
BEGIN { $| = 1;
"1..4\n"
; }
END {
"not ok 1\n"
unless
$loaded
;}
$loaded
= 1;
"ok 1\n"
;
######################### End of black magic.
# Make sure sync doesn't crash.
sync();
"ok 2\n"
;
# Test error-checking: number of arguments.
eval
"sync(1)"
;
unless
($@ and $@ =~ m/^Too many arguments/)
{
STDERR $@;
'not '
; }
"ok 3\n"
;
eval
{
&sync
(1); };
unless
($@ and $@ =~ m/^usage:/i)
{
STDERR $@;
'not '
; }
"ok 4\n"
;