From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id WK2rF/G4zV5MJwAA0tVLHw (envelope-from ) for ; Wed, 27 May 2020 00:48:49 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id IJWRE/G4zV7uEQAAB5/wlQ (envelope-from ) for ; Wed, 27 May 2020 00:48:49 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id DA9129403EA for ; Wed, 27 May 2020 00:48:48 +0000 (UTC) Received: from localhost ([::1]:47906 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jdkFS-0002Ha-Tr for larch@yhetil.org; Tue, 26 May 2020 20:48:46 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33796) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1jdkEs-0002Gz-P0 for emacs-orgmode@gnu.org; Tue, 26 May 2020 20:48:10 -0400 Received: from mout-p-201.mailbox.org ([2001:67c:2050::465:201]:60472) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256) (Exim 4.90_1) (envelope-from ) id 1jdkEr-0000AE-3e; Tue, 26 May 2020 20:48:10 -0400 Received: from smtp1.mailbox.org (smtp1.mailbox.org [IPv6:2001:67c:2050:105:465:1:1:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mout-p-201.mailbox.org (Postfix) with ESMTPS id 49Wscz10fhzQlBN; Wed, 27 May 2020 02:48:03 +0200 (CEST) X-Virus-Scanned: amavisd-new at heinlein-support.de Received: from smtp1.mailbox.org ([80.241.60.240]) by gerste.heinlein-support.de (gerste.heinlein-support.de [91.198.250.173]) (amavisd-new, port 10030) with ESMTP id y8pk5fwhJmY8; Wed, 27 May 2020 02:47:57 +0200 (CEST) From: Kevin Foley To: emacs-orgmode@gnu.org Subject: [PATCH] test-ob-tangle.el: Fix dirty repo state caused by testing Date: Tue, 26 May 2020 20:47:53 -0400 Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Rspamd-Queue-Id: 79CCA1772 X-Rspamd-Score: -4.50 / 15.00 / 15.00 Received-SPF: pass client-ip=2001:67c:2050::465:201; envelope-from=kevin@kevinjfoley.me; helo=mout-p-201.mailbox.org X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_PASS=-0.001, URIBL_BLOCKED=0.001 autolearn=_AUTOLEARN X-Spam_action: no action X-BeenThere: emacs-orgmode@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bastien Errors-To: emacs-orgmode-bounces+larch=yhetil.org@gnu.org Sender: "Emacs-orgmode" X-Scanner: scn0 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of emacs-orgmode-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=emacs-orgmode-bounces@gnu.org X-Spam-Score: -1.01 X-TUID: JvDplAG1irlG --=-=-= Content-Type: text/plain The attached patch kills the buffer of the file modified during testing to prevent leaving the repo in a dirty state. Thanks to Kyle for seeing this and providing guidance on how to address. Thanks, Kevin --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=0001-test-ob-tangle.el-Fix-dirty-repo-state-caused-by-tes.patch >From 46dd1cf3c34a372612e4a67a79afd84ca3317500 Mon Sep 17 00:00:00 2001 From: "Kevin J. Foley" Date: Tue, 26 May 2020 20:42:54 -0400 Subject: [PATCH] test-ob-tangle.el: Fix dirty repo state caused by testing * testing/lisp/test-ob-tangle.el (ob-tangle/detangle-false-positive): Kill modified buffer after test. Another test is causing the modifications to be saved which leaves the repo in a dirty state after testing. --- testing/lisp/test-ob-tangle.el | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/testing/lisp/test-ob-tangle.el b/testing/lisp/test-ob-tangle.el index ed75e6ca4..bd2d99ca2 100644 --- a/testing/lisp/test-ob-tangle.el +++ b/testing/lisp/test-ob-tangle.el @@ -384,12 +384,14 @@ (ert-deftest ob-tangle/commented-src-blocks () (ert-deftest ob-tangle/detangle-false-positive () "Test handling of false positive link during detangle." - (org-test-in-example-file (expand-file-name "babel.el" org-test-example-dir) - (org-babel-detangle) - (org-test-at-id "73115FB0-6565-442B-BB95-50195A499EF4" - (org-babel-next-src-block) - (should (equal (string-trim (org-element-property :value (org-element-at-point))) - ";; detangle changes"))))) + (unwind-protect + (org-test-in-example-file (expand-file-name "babel.el" org-test-example-dir) + (org-babel-detangle) + (org-test-at-id "73115FB0-6565-442B-BB95-50195A499EF4" + (org-babel-next-src-block) + (should (equal (string-trim (org-element-property :value (org-element-at-point))) + ";; detangle changes")))) + (kill-buffer "babel.org"))) (provide 'test-ob-tangle) -- 2.19.0 --=-=-=--