equal
deleted
inserted
replaced
|
1 use 5.010; |
1 use strict; |
2 use strict; |
2 use warnings; |
3 use warnings; |
3 use Test::More; |
4 use Test::More; |
|
5 use autodie qw(:all); |
4 |
6 |
5 BEGIN { |
7 BEGIN { |
6 use_ok "BlockDev"; |
8 use_ok "BlockDev"; |
7 } |
9 } |
8 |
10 |
|
11 my @devices = BlockDev->list(); |
|
12 { # device list |
|
13 |
|
14 my @proc = (); |
|
15 open(my $fh, "/proc/partitions"); |
|
16 while (<$fh>) { |
|
17 /^\s*(\d+\s+){3}(?<dev>\S+)/ or next; |
|
18 push @proc => $+{dev}; |
|
19 } |
|
20 is_deeply(\@devices => \@proc, "got all devices"); |
|
21 } |
|
22 |
9 done_testing(); |
23 done_testing(); |