From: Gilles Espinasse Date: Mon, 7 May 2012 07:12:06 +0000 (+0200) Subject: Fix w tests when no user is logged in X-Git-Tag: v3.3.3~2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e6bc6297564c953edfe7c342da8a6e5ca9436156;p=procps-ng Fix w tests when no user is logged in When the build system is a chroot with no user logged in , all w tests fail because of {1,} match rule for the userline Allow 0 match replacing {1,} with * Signed-off-by: Gilles Espinasse --- diff --git a/testsuite/w.test/w.exp b/testsuite/w.test/w.exp index 30ab22ca..8fd744bd 100644 --- a/testsuite/w.test/w.exp +++ b/testsuite/w.test/w.exp @@ -17,10 +17,10 @@ set w_login "\(\\d+\[A-Z\]\[a-z\]{2}\\d+\|\[A-Z\]\[a-z\]{2}\\d+\|\\d+:\\d+\)" set w_idle "\(\\?xdm\\?\|\\?\|\\d+days\|\\d+:\\d+m?\|\\d+.\\d+s\)" set w_ival7 "\(\\?\|\\d+days\|\\d+:\\d+m?\|\\d+.\\d+s\)" set w_what "\[A-Za-z0-9_\/\\-\]+" -set w_std_userlines "\(${w_user}\\s+${w_tty}\\s+${w_login}\\s+${w_idle}\\s+${w_ival7}\\s+${w_ival7}\\s+${w_what}\\s*\){1,}" -set w_short_userlines "\(${w_user}\\s+${w_tty}\\s+${w_idle}\\s+${w_what}\\s*\){1,}" -set w_from_userlines "\(${w_user}\\s+${w_tty}\\s+${w_from}\\s+${w_login}\\s+${w_idle}\\s+${w_ival7}\\s+${w_ival7}\\s+${w_what}\\s*\){1,}" -set w_fromshort_userlines "\(${w_user}\\s+${w_tty}\\s+${w_from}\\s+${w_idle}\\s+${w_what}\\s*\){1,}" +set w_std_userlines "\(${w_user}\\s+${w_tty}\\s+${w_login}\\s+${w_idle}\\s+${w_ival7}\\s+${w_ival7}\\s+${w_what}\\s*\)*" +set w_short_userlines "\(${w_user}\\s+${w_tty}\\s+${w_idle}\\s+${w_what}\\s*\)*" +set w_from_userlines "\(${w_user}\\s+${w_tty}\\s+${w_from}\\s+${w_login}\\s+${w_idle}\\s+${w_ival7}\\s+${w_ival7}\\s+${w_what}\\s*\)*" +set w_fromshort_userlines "\(${w_user}\\s+${w_tty}\\s+${w_from}\\s+${w_idle}\\s+${w_what}\\s*\)*" set test "w with no arguments" spawn $w