From nobody Wed Jul 19 14:47:46 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 4R5dw31cqdz4nNnH; Wed, 19 Jul 2023 14:47:47 +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 4R5dw308Wrz3hKB; Wed, 19 Jul 2023 14:47:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689778067; 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=7B8qOsge/rSMeVraufGPBGhEqzFIzT5ViYsba3UBhuY=; b=wtDI1JHJNPA3+bE7kBlPMYGHhxfibzYVZk9FhTmQ373em6xHRRV5Gvx8z20X2AuOnN2iWh xwC0rjURMTFnX/otct0lyOJsjPsuBvyjviSeIfQo9kyfjywrTWZKESgJ3KvmTkxNYNOk8m lh0LYVu98Hxb73Rtzd5VsmiTGbfOZeJ8+iDFlvxDZEoLchfe14d0q2T+3Yd2+JWklkyaRH 5uLJ0h441ZnjujVK5Ddnwaohmdo5DXo+ExVHUAKcXnTbdb2lounuM+Ng0j5JltoJwG3Fo2 tD42CWBzzEY3r4kNjpibLQRyMilQktqB4Vnd+PAaLo9h56BpiYedhRMLzhLiZQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1689778067; 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=7B8qOsge/rSMeVraufGPBGhEqzFIzT5ViYsba3UBhuY=; b=F0M8A6HyNB/4KisuYJ+7Re+yVo/MDTef69tVRNQ/HkcD63cpe3ZP/mUEmBQRedlipRaTUC OpUUMNZ3UfAkPy8y8Rf/7qSuNvL73wY4U1YoPtzOaGoEfTjAj4SBMylM1qmVLMR2jOVvay pKJzOWVF6Knbh7s9Ueqaw/ODf/bIjEy+IRZU6mRhR66dMeZ+4JseaGdrmzdRmXbYU/QCOs MvAUWyf4OdzBTnWtAYeKubRojTwR97TQo8/1qVim3BFa7LVKXm5DDeRRva0/ZUFO2kvz1P 3gZ7aSPZFAWl9XnQmyQsxHh1rV38KJRJ+qszoMxBTKbtuN9Q2UN2QyCsafMvnA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1689778067; a=rsa-sha256; cv=none; b=nro/F9NyRYQifSCpob28D9XC6yXahcmJ8fZJQ22KSbzzcasWLn0ALa7UAsHYM5mImUfaMU qepm/fpY/O1ggWtN1MSP6tfPzswHNc9lsyDault2oL08gfA3uAZELzr28NtP73NcXBbbGd 7cRSY3wEFF+x3fUWF74MCDOKw4T3Y7K5zCm7AEZ2LOibKPqLWpX+NH5slb45/1C8O835JR omk8r/wozbYTnisLABqeLl/2TXEnKyjVdTz8JYJ5i7nxI9UGS89aaXgCaBkkeJsWpug9kW 2OrJ19cVbtVUr1YXIKY3fqx2z/KvBIOZy+qZkYuvQs+ETohrqgo218dyUTa4Xw== 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 4R5dw26KD1zqwD; Wed, 19 Jul 2023 14:47:46 +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 36JElkXm050423; Wed, 19 Jul 2023 14:47:46 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 36JElkmF050422; Wed, 19 Jul 2023 14:47:46 GMT (envelope-from git) Date: Wed, 19 Jul 2023 14:47:46 GMT Message-Id: <202307191447.36JElkmF050422@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: a122c3c49278 - main - 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/main X-Git-Reftype: branch X-Git-Commit: a122c3c49278f8247296fdc1c097129e4862e472 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=a122c3c49278f8247296fdc1c097129e4862e472 commit a122c3c49278f8247296fdc1c097129e4862e472 Author: Dag-Erling Smørgrav AuthorDate: 2023-07-19 14:25:56 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-07-19 14:47:23 +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 --- 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 ddcfbdc6146e..a27c58285c20 100644 --- a/usr.bin/unifdef/tests/Makefile +++ b/usr.bin/unifdef/tests/Makefile @@ -2,6 +2,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 <