From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id D459C159C9B for ; Sun, 11 Aug 2024 10:11:18 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AE38D2BC0F8; Sun, 11 Aug 2024 10:11:15 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 98AE82BC0F9 for ; Sun, 11 Aug 2024 10:11:15 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id BE0FA343118 for ; Sun, 11 Aug 2024 10:11:14 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 19A101EF1 for ; Sun, 11 Aug 2024 10:11:11 +0000 (UTC) From: "Sam James" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sam James" Message-ID: <1723371064.6ee0913b255b36c6fef503564bb26b56ee4c3268.sam@gentoo> Subject: [gentoo-commits] proj/gentoo-functions:master commit in: / X-VCS-Repository: proj/gentoo-functions X-VCS-Files: test-functions X-VCS-Directories: / X-VCS-Committer: sam X-VCS-Committer-Name: Sam James X-VCS-Revision: 6ee0913b255b36c6fef503564bb26b56ee4c3268 X-VCS-Branch: master Date: Sun, 11 Aug 2024 10:11:11 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 6d145e87-98aa-4f36-874b-e37f4ebce6d5 X-Archives-Hash: 06ac86ea3feb1b3c96809a7a854df2ef commit: 6ee0913b255b36c6fef503564bb26b56ee4c3268 Author: Kerin Millar plushkava net> AuthorDate: Sat Aug 10 05:59:00 2024 +0000 Commit: Sam James gentoo org> CommitDate: Sun Aug 11 10:11:04 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=6ee0913b test-functions: don't increment testnum by 2 for test_ebegin() Also, restore the correct test_description string, which was being lost in a subshell. Signed-off-by: Kerin Millar plushkava.net> Signed-off-by: Sam James gentoo.org> test-functions | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/test-functions b/test-functions index 28c72da..81593b8 100755 --- a/test-functions +++ b/test-functions @@ -109,14 +109,16 @@ test_die() { test_ebegin() { set -- eq 0 - callback() ( + callback() { test_description="ebegin message (expecting terminating newline)" - _eprint() { - shift - _ends_with_newline "$*" - } - ebegin "message" - ) + ( + _eprint() { + shift + _ends_with_newline "$*" + } + ebegin "message" + ) + } iterate_tests 2 "$@" } @@ -1200,7 +1202,7 @@ elif ! GENFUN_MODULES="portage rc" . ./functions.sh; then else assign_tmpdir test_chdir || rc=1 - test_ebegin || rc=1; testnum=$((testnum + 1)) + test_ebegin || rc=1 test_is_older_than || rc=1 test_get_bootparam || rc=1 test_esyslog || rc=1