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

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