]> granicus.if.org Git - procps-ng/commitdiff
fixed uptime check regexp
authorCraig Small <csmall@enc.com.au>
Fri, 2 Mar 2012 12:05:28 +0000 (23:05 +1100)
committerCraig Small <csmall@enc.com.au>
Fri, 2 Mar 2012 12:05:28 +0000 (23:05 +1100)
testsuite/uptime.test/uptime.exp
testsuite/w.test/w.exp

index 7529fe92d4d625ec0801067af8669812fe7b46c3..fdc1262738b2f20f7c359663f2c79508875dd3c1 100644 (file)
@@ -5,4 +5,4 @@ set uptime "${topdir}uptime"
 
 set test "uptime"
 spawn $uptime
-expect_pass "$test" "^\\s+\\d{2}:\\d{2}:\\d{2} up (\\d+ days?,)?\\s*\\d+(min|:\\d+), +\\d+ users?, +load average: \[0-9.\]+, \[0-9.\]+, \[0-9.\]+\\s*$"
+expect_pass "$test" "^\\s+\\d{2}:\\d{2}:\\d{2} up (\\d+ days?,)?\\s*\\d+( min|:\\d+), +\\d+ users?, +load average: \[0-9.\]+, \[0-9.\]+, \[0-9.\]+\\s*$"
index eb76882b117e3572bfcc96e8a409a2fe5bfc81f8..30ab22cab5ed49f6e367532b4fa084954908cb1c 100644 (file)
@@ -4,7 +4,7 @@
 # FIXME - the user lines only go to idle
 set w "${topdir}w"
 
-set w_uptime "\\s+\\d{2}:\\d{2}:\\d{2} up (\\d+ days?,)?\\s*\\d+(min|:\\d+), +\\d+ users?, +load average: \[0-9.\]+, \[0-9.\]+, \[0-9.\]+\\s+"
+set w_uptime "\\s+\\d{2}:\\d{2}:\\d{2} up (\\d+ days?,)?\\s*\\d+( min|:\\d+), +\\d+ users?, +load average: \[0-9.\]+, \[0-9.\]+, \[0-9.\]+\\s+"
 set w_std_header "${w_uptime}USER\\s+TTY\\s+LOGIN@\\s+IDLE\\s+JCPU\\s+PCPU\\s+WHAT\\s+"
 set w_short_header "${w_uptime}USER\\s+TTY\\s+IDLE\\s+WHAT\\s+"
 set w_from_header "${w_uptime}USER\\s+TTY\\s+FROM\\s+LOGIN@\\s+IDLE\\s+JCPU\\s+PCPU\\s+WHAT\\s+"