logo

utils

~/.local/bin tools and git-hooks git clone https://hacktivis.me/git/utils.git

sleep (525B)


  1. #!/usr/bin/env atf-sh
  2. # SPDX-FileCopyrightText: 2017-2023 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. atf_test_case real
  5. real_body() {
  6. atf_check -e 'inline:real 1.000000\nuser 0.000000\nsys 0.000000\n' \time -p ../cmd/sleep 1
  7. }
  8. atf_test_case decimal
  9. decimal_body() {
  10. atf_check -e 'inline:real 0.100000\nuser 0.000000\nsys 0.000000\n' \time -p ../cmd/sleep .1
  11. }
  12. atf_init_test_cases() {
  13. cd "$(atf_get_srcdir)" || exit 1
  14. atf_add_test_case real
  15. atf_add_test_case decimal
  16. }