From nobody Fri Aug 29 19:24:57 2025 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 4cD7WY5t37z6642x; Fri, 29 Aug 2025 19:24:57 +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 "R12" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4cD7WY4wR7z3YK6; Fri, 29 Aug 2025 19:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756495497; 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=T6XVCuCIBw0IlSunGMunintaaZcgqQgBPyQBTfKTXWM=; b=BHGlr6CqLI1YCOFmJT02C+mv35jf5Phg8Z4LbjHV4AjQG5bjWPb3QUm5gauj6m6DHFRRM7 7tTr6vPkf6ji++2i007y0hQrhiIBOmX1fV8cS3+MIu4p3QD8HmpZsSOhVStEVFrXjSQAnS 7EpEHFWSJcbW9QxiNMnwiOygDHoxhYLrjdCDyzIBQj8PS4ypUcXJjeEKJ8yN5AQPNftQw1 dEbhKJCw6lHSJTMNV5pmYxK3j6U5Nr6H6JJ54kCREyxmmOJcpp+uv1g2mz1+B7ClA6wdf/ B2viO2EcVPRdugGvcQpPRKBmE2eqYvJdvRl/7Yo1rwOFgJbRvkZOpkFPGoWg3g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1756495497; 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=T6XVCuCIBw0IlSunGMunintaaZcgqQgBPyQBTfKTXWM=; b=ImXzG4TPsMRREDkQLSWHQ+7B26xNY3yqKuxbUD5ZeLIJDRXkpYp7Ei1t7Dn0SItsIEjMSR ams20XH+XemKBJq1Wh6dnX+pNGgiILYUmY3e9lEBYiyvpWAku+BAVxbdZIXPzi29PNjd49 V72fLHBsrkEnSxsSek1f/IQjjgf6NWqLtpdu+MI0daPQ0/LV9PPkQnbe0muvIHNq3hOjL9 xhsLuzbBxlVvbruKAV/GigtSEpflPn+OvsUxRWDsDuSM5ziYGMCTylYE2AviULL+g0WRUV Zhhzsv+7jlZf65zckSy5hw+SOwDwkkxsAuw53MMMB+D3VKMQKZMXoBP4a2w2DQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1756495497; a=rsa-sha256; cv=none; b=oFEq05lNqZupuC1p2a5zk+uElDBl9AS/uHdmKyoovXN0oXpDd240d6WIk9kAqjV1nvm0NL RVifjx7M7k7kv4Q0h4WqIRfjoZCaGpD3NRUBzdj5SWSGzYfOQIEXm24pjTIVQRuL90opwM P73aFKFBuC6hEXseH67ODGO0TMr3k6VHS2iGB7MUKSsEwkAVBN/traw3k9w+WGMSs/2rAT VJgT2f1yfCQrMJ2FBiGDU0/jyQja1CTg2PYrXCr6NDIFx/hbrSNX1Ajkw77gUgRNNA4PzP ITf5KxUHIi8KSMj5HmgwsIzzxHQ2HPSgDgi7MrN84UEHed7QxWl+PZjqZiw9fw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4cD7WY4L0Hzt4C; Fri, 29 Aug 2025 19:24:57 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 57TJOvvJ071720; Fri, 29 Aug 2025 19:24:57 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 57TJOv3o071717; Fri, 29 Aug 2025 19:24:57 GMT (envelope-from git) Date: Fri, 29 Aug 2025 19:24:57 GMT Message-Id: <202508291924.57TJOv3o071717@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Kyle Evans Subject: git: cc36624b2a8b - main - patch: test for unified diffs with spaces in filenames 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: X-BeenThere: dev-commits-src-all@freebsd.org Sender: owner-dev-commits-src-all@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: kevans X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: cc36624b2a8be3fbf180c5ae8d310d86486884bc Auto-Submitted: auto-generated The branch main has been updated by kevans: URL: https://cgit.FreeBSD.org/src/commit/?id=cc36624b2a8be3fbf180c5ae8d310d86486884bc commit cc36624b2a8be3fbf180c5ae8d310d86486884bc Author: Kyle Evans AuthorDate: 2025-08-29 19:24:35 +0000 Commit: Kyle Evans CommitDate: 2025-08-29 19:24:35 +0000 patch: test for unified diffs with spaces in filenames The older GNU patch that we had in base did not properly handle spaces in filenames in unified diffs, but bsdpatch seems to have handled this fine at least since the version we imported into base initially. Add a test with spaces in the filename specifically to be sure. PR: 181272 --- usr.bin/patch/tests/unified_patch_test.sh | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/usr.bin/patch/tests/unified_patch_test.sh b/usr.bin/patch/tests/unified_patch_test.sh index 47c4dc5faf73..a4b46ef34221 100755 --- a/usr.bin/patch/tests/unified_patch_test.sh +++ b/usr.bin/patch/tests/unified_patch_test.sh @@ -161,6 +161,23 @@ file_removal_body() atf_check -o inline:"y\n" cat foo } +atf_test_case namespace +namespace_head() +{ + atf_set "descr" "Test that patch(1) handles files with spaces in the name" +} +namespace_body() +{ + echo "ABC" > "with spaces.orig" + echo "ZYX" > "with spaces" + + atf_check -s not-exit:0 -o save:spaces.diff \ + diff -u "with spaces.orig" "with spaces" + + atf_check mv "with spaces.orig" "with spaces" + atf_check -o not-empty patch < spaces.diff +} + atf_test_case plinelen plinelen_body() { @@ -187,5 +204,6 @@ atf_init_test_cases() atf_add_test_case file_creation atf_add_test_case file_nodupe atf_add_test_case file_removal + atf_add_test_case namespace atf_add_test_case plinelen }