logo

utils-std

Collection of commonly available Unix tools

uname (601B)


  1. #!/usr/bin/env atf-sh
  2. # SPDX-FileCopyrightText: 2017 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. atf_test_case noargs
  5. noargs_body() {
  6. atf_check -o "inline:$(uname -s)\n" ../cmd/uname
  7. }
  8. atf_test_case all
  9. all_body() {
  10. atf_check -o "inline:$(uname -s) $(uname -n) $(uname -r) $(uname -v) $(uname -m)\n" ../cmd/uname -a
  11. }
  12. atf_test_case sysname
  13. sysname_body() {
  14. atf_check -o "inline:$(uname -s)\n" ../cmd/uname -s
  15. }
  16. atf_init_test_cases() {
  17. cd "$(atf_get_srcdir)" || exit 1
  18. atf_add_test_case noargs
  19. atf_add_test_case all
  20. atf_add_test_case sysname
  21. }