tests: Skip test if file extents are not support
[nbdkit.git] / tests / shebang.pl
blob17c78210324774e9f582fcfe35e080182c68a179
1 #!../nbdkit perl
3 use strict;
5 my $disk = "\0" x (1024*1024);
7 sub open
9 my $readonly = shift;
10 my $h = { readonly => $readonly };
11 return $h;
14 sub close
16 my $h = shift;
19 sub get_size
21 my $h = shift;
22 return length ($disk);
25 sub pread
27 my $h = shift;
28 my $count = shift;
29 my $offset = shift;
30 return substr ($disk, $offset, $count);