From: Evgenii Klimov <eugene.dev@lipklim.org>
To: "emacs-orgmode@gnu.org" <emacs-orgmode@gnu.org>
Subject: [BUG] [PATCH] Avoid interaction in test ~ob-tangle/detangle-false-positive~
Date: Sun, 16 Jul 2023 13:36:06 +0100 [thread overview]
Message-ID: <87zg3wauug.fsf@lipklim.org> (raw)
[-- Attachment #1: Type: text/plain, Size: 684 bytes --]
Test ~ob-tangle/detangle-false-positive~ asks for confirmation to kill
the buffer, connected to testing/examples/babel.org file, that is
modified during the couse of the test.
Way to reproduce the bug (from projects main dir):
#+BEGIN_SRC sh :dir (expand-file-name ".")
emacs -Q \
-L lisp/ -L testing/ -L testing/lisp -l lisp/org.el \
-l lisp/org-id.el -l testing/org-test.el -l testing/lisp/test-ob-tangle.el \
--eval "(progn (org-reload) (setq org-confirm-babel-evaluate nil) \
(org-babel-do-load-languages 'org-babel-load-languages \
'((emacs-lisp . t) (shell . t) (org . t))))" \
--eval '(ert "ob-tangle/detangle-false-positive")'
#+END_SRC
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-testing-lisp-test-ob-tangle.el-Avoid-interaction-in-.patch --]
[-- Type: text/x-diff, Size: 1054 bytes --]
From 5905e37a581d4cf2a4a517593c91730d836b6471 Mon Sep 17 00:00:00 2001
From: Evgenii Klimov <eugene.dev@lipklim.org>
Date: Sun, 16 Jul 2023 13:14:38 +0100
Subject: [PATCH] testing/lisp/test-ob-tangle.el: Avoid interaction in test
* testing/lisp/test-ob-tangle.el (ob-tangle/detangle-false-positive):
Unset modification flag from buffer to kill
(testing/examples/babel.org) in tear down step of test to avoid Emacs
asking for confirmation during interactive testing from within Emacs.
---
testing/lisp/test-ob-tangle.el | 2 ++
1 file changed, 2 insertions(+)
diff --git a/testing/lisp/test-ob-tangle.el b/testing/lisp/test-ob-tangle.el
index b1b0a0a53..07e75f4d3 100644
--- a/testing/lisp/test-ob-tangle.el
+++ b/testing/lisp/test-ob-tangle.el
@@ -565,6 +565,8 @@ another block
(should (equal (string-trim (org-element-property
:value (org-element-at-point)))
";; detangle changes"))))
+ (with-current-buffer buffer
+ (set-buffer-modified-p nil))
(kill-buffer buffer))))
(provide 'test-ob-tangle)
--
2.34.1
next reply other threads:[~2023-07-16 12:46 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-16 12:36 Evgenii Klimov [this message]
2023-07-17 9:00 ` [BUG] [PATCH] Avoid interaction in test ~ob-tangle/detangle-false-positive~ Ihor Radchenko
2023-07-17 11:53 ` Evgenii Klimov
2023-07-17 12:46 ` Ihor Radchenko
2023-07-20 22:11 ` Evgenii Klimov
2023-07-21 7:45 ` Ihor Radchenko
2023-07-21 9:52 ` Bastien Guerry
2023-07-21 9:55 ` Ihor Radchenko
2023-07-21 13:42 ` Evgenii Klimov
2023-07-21 17:03 ` Ihor Radchenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://www.orgmode.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87zg3wauug.fsf@lipklim.org \
--to=eugene.dev@lipklim.org \
--cc=emacs-orgmode@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).