logo

system-testsuite

Unix system testsuite (highlights broken bits in GNU and BusyBox)

true (669B)


  1. #!/usr/bin/env atf-sh
  2. # Copyright © 2021 Haelwenn (lanodan) Monnier <contact+system-testsuite@hacktivis.me>
  3. # SPDX-License-Identifier: BSD-3-Clause
  4. atf_test_case basic
  5. basic_body() {
  6. atf_check true
  7. }
  8. atf_test_case nohelp
  9. nohelp_body() {
  10. atf_check true --help
  11. }
  12. atf_test_case devfull
  13. devfull_body() {
  14. atf_check true --help >/dev/full
  15. }
  16. atf_test_case closefds
  17. closefds_body() {
  18. atf_check sh -c 'true --help >&-'
  19. atf_check sh -c 'true --help 2>&-'
  20. atf_check sh -c 'true --help <&-'
  21. atf_check sh -c 'true --help <&- >&- 2>&-'
  22. }
  23. atf_init_test_cases() {
  24. atf_add_test_case basic
  25. atf_add_test_case nohelp
  26. atf_add_test_case devfull
  27. atf_add_test_case closefds
  28. }