]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
tests: fix regex to match "-" in ipcent field in df/total-verify.sh
authorBernhard Voelker <mail@bernhard-voelker.de>
Thu, 6 Dec 2012 09:11:42 +0000 (10:11 +0100)
committerBernhard Voelker <mail@bernhard-voelker.de>
Thu, 6 Dec 2012 10:15:34 +0000 (11:15 +0100)
The regular expression failed to match for file systems that
do not provide inode statistics, e.g. VFAT or CIFS (depending
on the underlying peer file system).

* tests/df/total-verify.sh: Fix the regular expression to match
a dash in the ipcent field again.

Reported by Assaf Gordon in http://bugs.gnu.org/13099.
Bug introduced in commit v8.20-18-gdae8d22.

tests/df/total-verify.sh

index 18d215f118d2fe1e4ae33cc33051968b72a03cad..5f375bb880751935c42c4d43250a5153fc1aba89 100755 (executable)
@@ -32,7 +32,7 @@ while (<>)
     # /dev/sdc1                  0       0       0    -  /c
     # tmpfs                1536000   12965 1523035    1% /tmp
     # total                5285932  787409 4498523   15% -
-    /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:- |[0-9]+%) (.*)$/
+    /^(.*?) +(-?\d+|-) +(-?\d+|-) +(-?\d+|-) +(?:-|[0-9]+%) (.*)$/
       or die "$0: invalid input line\n: $_";
     if ($1 eq 'total' && $5 eq '-')
       {