| 1 | ## compare_shells: bash dash mksh zsh ash
|
| 2 | ## oils_failures_allowed: 0
|
| 3 | ## suite: disabled
|
| 4 |
|
| 5 | # NOTE: disabled this file because the spec-cpp docker image doesn't have
|
| 6 | # 'time', so 'if command time' fails!
|
| 7 | # I'm just running it locally.
|
| 8 |
|
| 9 | # bugs we ran into in ./configure
|
| 10 | #
|
| 11 | # - old version of dash: doesn't unset _do_fork=0
|
| 12 | # - old version of bash on OS X: background job and if command time -f
|
| 13 | #
|
| 14 | # other bug I ran into:
|
| 15 | # - weird shopt -s lastpipe issue on bash
|
| 16 |
|
| 17 | #### ./configure idiom
|
| 18 | set -o errexit
|
| 19 |
|
| 20 | if command time -f '%e %M' true; then
|
| 21 | echo 'supports -f'
|
| 22 | # BUG: this was wrong
|
| 23 | #time -f '%e %M' true
|
| 24 |
|
| 25 | # Need 'command time'
|
| 26 | command time -f '%e %M' true
|
| 27 | fi
|
| 28 |
|
| 29 | if env time -f '%e %M' true; then
|
| 30 | echo 'env'
|
| 31 | env time -f '%e %M' true
|
| 32 | fi
|
| 33 | ## STDOUT:
|
| 34 | supports -f
|
| 35 | env
|
| 36 | ## END
|