t/00-module.t
changeset 1 d2562d0417a9
parent 0 8220abbf27bb
child 2 ba9ad363d185
--- a/t/00-module.t	Tue Jul 19 16:05:43 2011 +0200
+++ b/t/00-module.t	Wed Jul 20 22:35:03 2011 +0200
@@ -1,9 +1,23 @@
+use 5.010;
 use strict;
 use warnings;
 use Test::More;
+use autodie qw(:all);
 
 BEGIN {
     use_ok "BlockDev";
 }
 
+my @devices = BlockDev->list();
+{   # device list
+
+    my @proc = ();
+    open(my $fh, "/proc/partitions");
+    while (<$fh>) {
+	/^\s*(\d+\s+){3}(?<dev>\S+)/ or next;
+	push @proc => $+{dev};
+    }
+    is_deeply(\@devices => \@proc, "got all devices");
+}
+
 done_testing();