From 82c6fccacbbc8825df7f57d73af3c66a0f9f8ee0 Mon Sep 17 00:00:00 2001 From: Craig Small Date: Fri, 2 Mar 2012 23:05:28 +1100 Subject: [PATCH] fixed uptime check regexp --- testsuite/uptime.test/uptime.exp | 2 +- testsuite/w.test/w.exp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) 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+" -- 2.40.0