OILS / spec / builtin-times.test.sh View on Github | oilshell.org

16 lines, 9 significant
1## compare_shells: bash zsh
2
3#### times shows two formatted lines
4output=$(times)
5echo "$output" | while read line
6do
7 echo "$line" | egrep -q '[0-9]+m[0-9]+.[0-9]+s [0-9]+m[0-9]+.[0-9]+s' && echo "pass"
8done
9
10echo "$output" | wc -l
11## status: 0
12## STDOUT:
13pass
14pass
152
16## END