logo

system-testsuite

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

false (746B)


  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 -s exit:1 false
  7. }
  8. atf_test_case nohelp
  9. nohelp_body() {
  10. atf_check -s exit:1 false --help
  11. }
  12. atf_test_case devfull
  13. devfull_body() {
  14. atf_check -s exit:1 false --help >/dev/full
  15. }
  16. atf_test_case closefds
  17. closefds_body() {
  18. atf_check -s exit:1 sh -c 'false --help >&-'
  19. atf_check -s exit:1 sh -c 'false --help 2>&-'
  20. atf_check -s exit:1 sh -c 'false --help <&-'
  21. atf_check -s exit:1 sh -c 'false --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. }