logo

utils-extra

Collection of extra tools for Unixes git clone https://anongit.hacktivis.me/git/utils-extra.git/

sizeof (708B)


  1. #!/usr/bin/env atf-sh
  2. # SPDX-FileCopyrightText: 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: MPL-2.0
  4. atf_test_case empty
  5. empty_body() {
  6. atf_check -o not-empty ../cmd/sizeof
  7. }
  8. atf_test_case devfull
  9. devfull_body() {
  10. has_glibc && atf_expect_fail "glibc ignoring write errors for printf()"
  11. [ "$(uname -s)" = "FreeBSD" ] && atf_skip "FreeBSD ignoring write errors for printf()"
  12. [ "$(uname -s)" = "NetBSD" ] && atf_skip "NetBSD ignoring write errors for printf()"
  13. atf_check -s exit:1 sh -c '../cmd/sizeof >/dev/full'
  14. }
  15. atf_init_test_cases() {
  16. cd "$(atf_get_srcdir)" || exit 1
  17. . ../test_functions.sh
  18. atf_add_test_case empty
  19. atf_add_test_case devfull
  20. }