From 42354876de823f52a431eac900d360c074c6198d Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Thu, 15 Jul 2021 14:56:58 -0300 Subject: aux/lib.sh: Add mkstemp and mkdtemp, and copy uuid over The tests were relying on the unspecified and non-standartized behaviour of "mktemp". Now they use "mkstemp()", a shim sh function to provide the expected behaviour, and an accompanying "mkdtemp()" function is also defined. To further decouple from specific implementations and OS-behaviours and quirks, a aux/lib.sh file containing both those functions was added. Its purpose is to also allow code under aux/ to not depend on specific behaviour. "mkdtemp()" had to be replicated in aux/ci/ci-build.sh, since it runs outside the repository. --- aux/workflow/assert-manpages.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'aux/workflow/assert-manpages.sh') diff --git a/aux/workflow/assert-manpages.sh b/aux/workflow/assert-manpages.sh index 8a3c497..b26c7a4 100755 --- a/aux/workflow/assert-manpages.sh +++ b/aux/workflow/assert-manpages.sh @@ -2,6 +2,8 @@ set -eu TLD="$(cat aux/tld.txt)" +. aux/lib.sh + IN_PLACE=false while getopts 'l:n:m:i' flag; do case "$flag" in @@ -36,7 +38,7 @@ assert_arg "${MAILING_LIST:-}" '-m MAILING_LIST' assert_arg "${LANGS:-}" '-l LANGS' -EXPECTED_EN="$(mktemp)" +EXPECTED_EN="$(mkstemp)" cat <> "$EXPECTED_EN" @@ -72,7 +74,7 @@ Comments and discussions .UE . EOF -EXPECTED_PT="$(mktemp)" +EXPECTED_PT="$(mkstemp)" cat <> "$EXPECTED_PT" @@ -108,7 +110,7 @@ Comentários e discussões .UE . EOF -EXPECTED_FR="$(mktemp)" +EXPECTED_FR="$(mkstemp)" cat <> "$EXPECTED_FR" @@ -146,7 +148,7 @@ Commentaires et discussions .UE . EOF -EXPECTED_EO="$(mktemp)" +EXPECTED_EO="$(mkstemp)" cat <> "$EXPECTED_EO" -- cgit v1.2.3