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 68B1E1581D3 for ; Wed, 22 May 2024 01:12:40 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 05C93E2A36; Wed, 22 May 2024 01:12:28 +0000 (UTC) Received: from smtp.gentoo.org (dev.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 DC30AE2A35 for ; Wed, 22 May 2024 01:12:27 +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 343FF335D6E for ; Wed, 22 May 2024 01:12:27 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 57D9F1B07 for ; Wed, 22 May 2024 01:12:24 +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: <1716295908.7b63d3d64275c32676a8cad3377294ab59b54486.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: 7b63d3d64275c32676a8cad3377294ab59b54486 X-VCS-Branch: master Date: Wed, 22 May 2024 01:12:24 +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: f9d03c49-a615-415b-b654-369c4174bc87 X-Archives-Hash: f46df61ba100c7df9b4d1ecda3df33b3 commit: 7b63d3d64275c32676a8cad3377294ab59b54486 Author: Kerin Millar plushkava net> AuthorDate: Tue May 21 10:48:37 2024 +0000 Commit: Sam James gentoo org> CommitDate: Tue May 21 12:51:48 2024 +0000 URL: https://gitweb.gentoo.org/proj/gentoo-functions.git/commit/?id=7b63d3d6 test-functions: Minor ebegin() test refactoring Signed-off-by: Kerin Millar plushkava.net> test-functions | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/test-functions b/test-functions index 6f755db..d65a3a2 100755 --- a/test-functions +++ b/test-functions @@ -95,19 +95,19 @@ test_ebegin() { _eprint() { shift _ends_with_newline "$*" - ok=$(( $? == 0 )) } ok=0 set -- "message" ebegin "$1" + retval=$? - if [ "${ok}" -eq 0 ]; then + if [ "${retval}" -ne 0 ]; then printf 'not ' fi printf 'ok %d - ebegin %s (expecting terminating newline)\n' "$((testnum + 1))" "$1" - return "$(( ok ? 0 : 1 ))" + return "${retval}" } test_edo() {