From: Craig Small Date: Fri, 2 Mar 2012 12:05:28 +0000 (+1100) Subject: fixed uptime check regexp X-Git-Tag: v3.3.3~73 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82c6fccacbbc8825df7f57d73af3c66a0f9f8ee0;p=procps-ng fixed uptime check regexp --- diff --git a/testsuite/uptime.test/uptime.exp b/testsuite/uptime.test/uptime.exp index 7529fe92..fdc12627 100644 --- a/testsuite/uptime.test/uptime.exp +++ b/testsuite/uptime.test/uptime.exp @@ -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*$" diff --git a/testsuite/w.test/w.exp b/testsuite/w.test/w.exp index eb76882b..30ab22ca 100644 --- a/testsuite/w.test/w.exp +++ b/testsuite/w.test/w.exp @@ -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+"