logo

utils

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

sizeof (729B)


  1. #!/usr/bin/env atf-sh
  2. # SPDX-FileCopyrightText: 2017-2022 Haelwenn (lanodan) Monnier <contact+utils@hacktivis.me>
  3. # SPDX-License-Identifier: GPL-2.0-only OR GPL-3.0-only
  4. atf_test_case empty
  5. empty_body() {
  6. atf_check -o not-empty ../bin/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 '../bin/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. }