t/02_disk_space.t: relax filesystem check
authorChristoph Berg <[email protected]>
Sat, 29 Aug 2015 21:03:43 +0000 (23:03 +0200)
committerChristoph Berg <[email protected]>
Sat, 29 Aug 2015 21:03:43 +0000 (23:03 +0200)
In https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=790231, Daniel
Schepler reports pbuilder (a throwaway-minimal-chroot build wrapper for
Debian packages) to setup the filesystem name to be shown as "-". Allow
this in the testsuite.

t/02_disk_space.t

index 74e3a6eeb9ad8983b1145848f8af867aaa6495ae..24d887f7a9bd878948e733f4d48376fa9c616f8c 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);
+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;