From nobody Thu Sep 07 14:51:03 2023 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4RhMcl6zzWz4snKT; Thu, 7 Sep 2023 14:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4RhMcl62kLz4krh; Thu, 7 Sep 2023 14:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694098263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q5FGXTWYlOLunk7ystgQc7eD9HfPo3ZOhdphx4YMKgY=; b=LiceYciy9+bfE14w8XMrBOyWQqnfRCFqq3fMHCeyn2PAkwGEeJvffKAJ/yowVUEMCmD7cz ZNQFcYSGYXGSxEXFcvmr/BMap3ptMZ8jJxurcH42aA1x70rk3eZM2tLIguV2Dh5GAIPITj BWb6vIJXh1rDgog4sr225I9utB9Zr4VuKDG3vReLc538oMoJl08c3bdpIDrlKsB9RVKTCK hq6QvGaOMvx/CBmzJDupUE7KP7Q65Cr0xCDee9+OExpwjAc+vm+1Haee42/cZnmLbErFNy 7MWuPof/93x3paRu+JAI2idfne68vmtq5rwFKgIg7xsZFFuNeusJVYucx3tukg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1694098263; a=rsa-sha256; cv=none; b=BQYTeG+1GTa2igun3LzpAeLf1B3Z9uzPEZyduYdwZPxhGjpvIQyLpCDP3d1glMZWIxkhpX jFGBVdzdsKVPcwhmPkB7dZlVeUWmb2BiZPN1OX3Q+VcHHYHEBvS9+Em5LjOiWzP5oyuazO XWHAFPgHBRPoF8b+SnxRuFwj+b1qBh3Ds8vnTULiHufQWSf6m45I2eub1Ei/lYlGNcbeLB nOT7LfLcvEcQnxZaqzJ5qAtDTv/tC1kc+gtOFaSURaoDqJ6IvmHyMo/yfG0FAvvbRKT+8j ooEvFnQHvaqvkFnUUo8SB1NUcacyYnyF88S3kwRqcEJGt/0eHz94rKXbBLHL7A== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1694098263; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=q5FGXTWYlOLunk7ystgQc7eD9HfPo3ZOhdphx4YMKgY=; b=Ctd80X0hHIzNOxag5KEdvb+rLuAZxPXjiJ8+5TiKXwAfTZkVXus6Yt6hu/WOdAPuDoQAUq ODZXBcjActdYNjOz0o9qGSJ6djg4p2tNYe+rnJ2GqBFXAh2oU0E7BEGyUuueEFXpuY+593 3CO62Vk4QGTh3TTdiYUv/enDIBOCiyf4Tckuu7kxF12O8QCS1mStpbi6e7NQQenvjfwlCF PIjCIDtjvM2hMTNi5SNwty5kiE1DsX5EY+agua10RXqJGv+OdJ1fSizvYHwVXVImb3nnCI eaPXQyEYdynrGuGTJfOrZEcmSMkuAVph9BDrGFurn1wXCC85HXH8bSS+nxKyeA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4RhMcl4v7cz13Z2; Thu, 7 Sep 2023 14:51:03 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 387Ep3CK013010; Thu, 7 Sep 2023 14:51:03 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 387Ep32Y013007; Thu, 7 Sep 2023 14:51:03 GMT (envelope-from git) Date: Thu, 7 Sep 2023 14:51:03 GMT Message-Id: <202309071451.387Ep32Y013007@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dag-Erling =?utf-8?Q?Sm=C3=B8rgrav?= Subject: git: 0c9caeb8694f - stable/13 - unifdef: Fix case where a multiline comment follows a directive. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 0c9caeb8694f278819cf9c1c8171e2985b2d5685 Auto-Submitted: auto-generated The branch stable/13 has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=0c9caeb8694f278819cf9c1c8171e2985b2d5685 commit 0c9caeb8694f278819cf9c1c8171e2985b2d5685 Author: Dag-Erling Smørgrav AuthorDate: 2023-07-19 14:25:56 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-09-07 08:57:19 +0000 unifdef: Fix case where a multiline comment follows a directive. Sponsored by: Klara, Inc. Reviewed by: kevans Differential Revision: https://reviews.freebsd.org/D41026 (cherry picked from commit a122c3c49278f8247296fdc1c097129e4862e472) --- usr.bin/unifdef/tests/Makefile | 1 + usr.bin/unifdef/tests/unifdef_test.sh | 22 ++++++++++++++++++++++ usr.bin/unifdef/unifdef.c | 5 +++-- 3 files changed, 26 insertions(+), 2 deletions(-) diff --git a/usr.bin/unifdef/tests/Makefile b/usr.bin/unifdef/tests/Makefile index fc8e5d46dabe..a75d405c9d3a 100644 --- a/usr.bin/unifdef/tests/Makefile +++ b/usr.bin/unifdef/tests/Makefile @@ -1,6 +1,7 @@ PACKAGE= tests +ATF_TESTS_SH= unifdef_test NETBSD_ATF_TESTS_SH= basic_test ${PACKAGE}FILES+= d_basic.in diff --git a/usr.bin/unifdef/tests/unifdef_test.sh b/usr.bin/unifdef/tests/unifdef_test.sh new file mode 100644 index 000000000000..98adef3adfdc --- /dev/null +++ b/usr.bin/unifdef/tests/unifdef_test.sh @@ -0,0 +1,22 @@ +# +# Copyright (c) 2023 Klara, Inc. +# +# SPDX-License-Identifier: BSD-2-Clause +# + +atf_test_case hash_comment +hash_comment_head() { + atf_set descr "multiline comment follows directive" +} +hash_comment_body() { + cat >f <