Skip to content

Commit 482d939

Browse files
committed
Merge pull request #57 from hadfl/coverage
- increase coverage...
2 parents e9e388b + f4d165b commit 482d939

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

t/zfs

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,17 @@ print STDERR '# zfs ' . join(' ', @ARGV) . "\n";
2121
my $command = shift @ARGV or exit 1;
2222

2323
for ($command){
24-
/^(?:snapshot|set|inherit|send|recv)$/ && exit;
24+
/^(?:set|inherit|send|recv)$/ && exit;
25+
26+
#pretend snapshot to fail => snapshot does exist already
27+
/^snapshot$/ && exit 1;
2528

2629
/^list$/ && do {
2730
if ($ARGV[3] eq '-t' && $ARGV[4] eq 'snapshot'){
31+
if ($ARGV[-1] =~ /^[^\@]+\@[^\@]+$/){
32+
print $ARGV[-1] . "\n";
33+
exit;
34+
}
2835
my $snapCount = ($dataSets{$ARGV[-1]} eq 'src') ? 60 : 58;
2936
#get timestamp rounded to minutes
3037
my $time = localtime(int(time / 60) * 60 - 3600);

0 commit comments

Comments
 (0)