| 1 |
Description: w test add FROM column |
| 2 |
The tests assume you haven't enabled the FROM column for w by default |
| 3 |
Debian has this enabled by default |
| 4 |
Author: Craig Small <[email protected]> |
| 5 |
Origin: Debian |
| 6 |
Forwarded: no |
| 7 |
Reviewed-by: Craig Small <[email protected]> |
| 8 |
Last-Update: 2024-10-15 |
| 9 |
--- a/testsuite/w.test/w.exp |
| 10 |
+++ b/testsuite/w.test/w.exp |
| 11 |
@@ -5,10 +5,10 @@ |
| 12 |
set w "${topdir}src/w" |
| 13 |
|
| 14 |
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+" |
| 15 |
-set w_std_header "${w_uptime}USER\\s+TTY\\s+LOGIN@\\s+IDLE\\s+JCPU\\s+PCPU\\s+WHAT\\s+" |
| 16 |
-set w_short_header "${w_uptime}USER\\s+TTY\\s+IDLE\\s+WHAT\\s+" |
| 17 |
-set w_from_header "${w_uptime}USER\\s+TTY\\s+FROM\\s+LOGIN@\\s+IDLE\\s+JCPU\\s+PCPU\\s+WHAT\\s+" |
| 18 |
-set w_fromshort_header "${w_uptime}USER\\s+TTY\\s+FROM\\s+IDLE\\s+WHAT\\s+" |
| 19 |
+set w_from_header "${w_uptime}USER\\s+TTY\\s+LOGIN@\\s+IDLE\\s+JCPU\\s+PCPU\\s+WHAT\\s+" |
| 20 |
+set w_fromshort_header "${w_uptime}USER\\s+TTY\\s+IDLE\\s+WHAT\\s+" |
| 21 |
+set w_std_header "${w_uptime}USER\\s+TTY\\s+FROM\\s+LOGIN@\\s+IDLE\\s+JCPU\\s+PCPU\\s+WHAT\\s+" |
| 22 |
+set w_short_header "${w_uptime}USER\\s+TTY\\s+FROM\\s+IDLE\\s+WHAT\\s+" |
| 23 |
|
| 24 |
set w_user "\[A-Za-z0-9_-\]+" |
| 25 |
set w_tty "\[a-z0-9/]+" |
| 26 |
@@ -18,10 +18,10 @@ |
| 27 |
set w_ival7 "\(\\?\|\\d+days\|\\d+:\\d+m?\|\\d+.\\d+s\)" |
| 28 |
set w_what "\[A-Za-z0-9_\/\\-\]+" |
| 29 |
set w_pids "\\d+/\\d+" |
| 30 |
-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*\)*" |
| 31 |
-set w_short_userlines "\(${w_user}\\s+${w_tty}\\s+${w_idle}\\s+${w_what}\\s*\)*" |
| 32 |
-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*\)*" |
| 33 |
-set w_fromshort_userlines "\(${w_user}\\s+${w_tty}\\s+${w_from}\\s+${w_idle}\\s+${w_what}\\s*\)*" |
| 34 |
+set w_from_userlines "\(${w_user}\\s+${w_tty}\\s+${w_login}\\s+${w_idle}\\s+${w_ival7}\\s+${w_ival7}\\s+${w_what}\\s*\)*" |
| 35 |
+set w_fromshort_userlines "\(${w_user}\\s+${w_tty}\\s+${w_idle}\\s+${w_what}\\s*\)*" |
| 36 |
+set w_std_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*\)*" |
| 37 |
+set w_short_userlines "\(${w_user}\\s+${w_tty}\\s+${w_from}\\s+${w_idle}\\s+${w_what}\\s*\)*" |
| 38 |
set w_pid_userlines "\(${w_user}\\s+${w_tty}\\s+${w_idle}\\s+%{w_pids}\s+${w_what}\\s*\)*" |
| 39 |
|
| 40 |
set test "w with no arguments" |