[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/idris-mode ac9ebf0159 07/13: Ensure that idris connection
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/idris-mode ac9ebf0159 07/13: Ensure that idris connection is closed in `idris-test-proof-search` |
Date: |
Thu, 5 Jan 2023 04:59:25 -0500 (EST) |
branch: elpa/idris-mode
commit ac9ebf015954f57e06c03e396f26ccaa07842ba0
Author: Marek L <nospam.keram@gmail.com>
Commit: Marek L <nospam.keram@gmail.com>
Ensure that idris connection is closed in `idris-test-proof-search`
Why:
In Idris2 the test is expected to fail but unfortunately that
also meant the Idris connection was not closed and leaked to other tests
causing unexpected failures.
---
idris-tests.el | 37 +++++++++++++++++++------------------
1 file changed, 19 insertions(+), 18 deletions(-)
diff --git a/idris-tests.el b/idris-tests.el
index 2d79f4162c..2802c207f9 100644
--- a/idris-tests.el
+++ b/idris-tests.el
@@ -134,24 +134,25 @@ remain."
:expected-result (if (string-match-p "idris2" idris-interpreter-path)
:failed
:passed)
- (let ((buffer (find-file "test-data/ProofSearch.idr")))
- (with-current-buffer buffer
- (idris-load-file)
- (dotimes (_ 5) (accept-process-output nil 1))
- (goto-char (point-min))
- (re-search-forward "search_here")
- (goto-char (match-beginning 0))
- (idris-proof-search)
- (dotimes (_ 5) (accept-process-output nil 1))
- (should (looking-at-p "lteSucc (lteSucc (lteSucc (lteSucc (lteSucc
lteZero))))"))
- (move-beginning-of-line nil)
- (delete-region (point) (line-end-position))
- (insert "prf = ?search_here")
- (save-buffer)
- (kill-buffer)))
-
- ;; More cleanup
- (idris-quit))
+ (unwind-protect
+ (let ((buffer (find-file "test-data/ProofSearch.idr")))
+ (with-current-buffer buffer
+ (idris-load-file)
+ (dotimes (_ 5) (accept-process-output nil 1))
+ (goto-char (point-min))
+ (re-search-forward "search_here")
+ (goto-char (match-beginning 0))
+ (idris-proof-search)
+ (dotimes (_ 5) (accept-process-output nil 1))
+ (should (looking-at-p "lteSucc (lteSucc (lteSucc (lteSucc (lteSucc
lteZero))))"))
+ (move-beginning-of-line nil)
+ (delete-region (point) (line-end-position))
+ (insert "prf = ?search_here")
+ (save-buffer)
+ (kill-buffer)))
+
+ ;; More cleanup
+ (idris-quit)))
(ert-deftest idris-test-find-cmdline-args ()
"Test that idris-mode calculates command line arguments from .ipkg files."
- [nongnu] elpa/idris-mode c9b2a4bee6 10/13: Add Xref backend for Idris, (continued)
- [nongnu] elpa/idris-mode c9b2a4bee6 10/13: Add Xref backend for Idris, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 6afe9a82b8 11/13: Merge pull request #602 from keram/impro-code, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode cb61f21432 08/13: Add idris-file-name-concat function as backward compatible, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 28758e0980 09/13: Ensure ibc file is deleted in `idris-test-idris-type-at-point` test, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode a060688b5c 13/13: Merge pull request #604 from keram/idris-xref-v1, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 306420713d 12/13: Merge pull request #603 from keram/impro-code3, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode dfce8b6631 01/13: Move `idris-run` from inferior-idris.el to idris-commands.el, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 9f4d497e68 02/13: Do not try delete last window when deleting idris buffer, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode 66daf810c7 03/13: Ensure restart of Idris connection takes into account, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode cb71c82e13 04/13: Rename and unify `idris-pop-to-repl` and `idris-switch-to-output-buffer` in favour of, ELPA Syncer, 2023/01/05
- [nongnu] elpa/idris-mode ac9ebf0159 07/13: Ensure that idris connection is closed in `idris-test-proof-search`,
ELPA Syncer <=