141 |
|
my $self=shift; |
142 |
|
my $name=shift; |
143 |
|
|
144 |
< |
if ( -f "$name" ) { |
145 |
< |
$self->testpass("File $name exists - test passed"); |
144 |
> |
if ( -e "$name" ) { |
145 |
> |
$self->testpass("$name exists - test passed"); |
146 |
|
} |
147 |
|
else { |
148 |
< |
$self->testfail("File $name does not exist"); |
148 |
> |
$self->testfail("$name does not exist"); |
149 |
|
} |
150 |
|
} |
151 |
|
|
243 |
|
@mylist=eval { $self->{object}->$subname(@_); }; |
244 |
|
die "Test Failed $@\n" if $@; |
245 |
|
if ( defined @mylist ) { |
246 |
+ |
# size check |
247 |
+ |
if ( $#mylist < $#{$self->{expect}} ) { |
248 |
+ |
$self->testfail("not enough returned values"); |
249 |
+ |
} |
250 |
|
foreach $myreturn ( @mylist ) { |
251 |
|
if ( ! defined $myreturn ) { |
252 |
|
print "Undefined Value Passed Back\n"; |
284 |
|
# |
285 |
|
sub expect { |
286 |
|
my $self=shift; |
283 |
– |
my $string=shift; |
287 |
|
|
288 |
< |
push @{$self->{expect}}, $string; |
288 |
> |
push @{$self->{expect}}, @_; |
289 |
|
} |
290 |
|
|
291 |
|
sub clearexpect { |