logo

utils-std

Collection of commonly available Unix tools git clone https://anongit.hacktivis.me/git/utils-std.git

time.t (678B)


  1. #!/usr/bin/env cram
  2. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. $ cd $TESTDIR/../cmd
  5. $ ./time
  6. Usage: time [-p|-v] command [argument ...]
  7. $ ./time -f
  8. time: error: Unrecognised option: '-f'
  9. Usage: time [-p|-v] command [argument ...]
  10. [1]
  11. $ ./time /var/empty/e/no/ent
  12. time: error: Failed executing '/var/empty/e/no/ent': No such file or directory
  13. real 0.[0-9]* (re)
  14. user 0.[0-9]* (re)
  15. sys 0.[0-9]* (re)
  16. [127]
  17. $ ./time false
  18. real 0.[0-9]* (re)
  19. user 0.[0-9]* (re)
  20. sys 0.[0-9]* (re)
  21. [1]
  22. $ ./time true
  23. real 0.[0-9]* (re)
  24. user 0.[0-9]* (re)
  25. sys 0.[0-9]* (re)