t/02_disk_space.t: Further relax device name check
authorChristoph Berg <[email protected]>
Thu, 22 Sep 2016 13:15:09 +0000 (15:15 +0200)
committerChristoph Berg <[email protected]>
Thu, 22 Sep 2016 13:15:09 +0000 (15:15 +0200)
In the wild (Debian sbuild) a CP output of "FS sid-pgdg-amd64-sbuild
mounted on /" was observed. Stop requiring the device name to start with
/ or -, and go with .* instead.

t/02_disk_space.t

index 24d887f7a9bd878948e733f4d48376fa9c616f8c..1b58ccdc86b146ec55871e948212c944d8f6561e 100644 (file)
@@ -39,7 +39,7 @@ $t = qq{$S identifies host};
 like ($result, qr{host:$host}, $t);
 
 $t = qq{$S reports file system};
-like ($result, qr{FS [/-].*? mounted on /.*? is using }, $t); # in some build environments, the filesystem is reported as "-"
+like ($result, qr{FS .* mounted on /.*? is using }, $t); # in some build environments, the filesystem is reported as "-"
 
 $t = qq{$S reports usage};
 like ($result, qr{ is using \d*\.\d+ [A-Z]B of \d*\.\d+ [A-Z]B}, $t);
@@ -54,6 +54,6 @@ $t = qq{$S flags insufficient space};
 like ($cp->run('-w "999z or 1%"'), qr{$label WARNING:}, $t);
 
 $t = qq{$S reports MRTG output};
-like ($cp->run('--output=mrtg'), qr{\A\d+\n0\n\n[/-].*\n}, $t);
+like ($cp->run('--output=mrtg'), qr{\A\d+\n0\n\n.*\n}, $t);
 
 exit;