branch: externals/phpinspect
commit 4ccab73555d1c875b85afbf632a76dea93fc46d0
Author: Hugo Thunnissen <de...@hugot.nl>
Commit: Hugo Thunnissen <de...@hugot.nl>

    Remove commented test + mention of removed `phpinspect-pctx-cancel'
---
 phpinspect-parse-context.el |  9 +-------
 test/phpinspect-test.el     |  1 -
 test/test-parse-context.el  | 50 ---------------------------------------------
 3 files changed, 1 insertion(+), 59 deletions(-)

diff --git a/phpinspect-parse-context.el b/phpinspect-parse-context.el
index fd17b81273..ef25c4fdd1 100644
--- a/phpinspect-parse-context.el
+++ b/phpinspect-parse-context.el
@@ -97,14 +97,7 @@ useless metadata tokens."))
   (inline-quote (length (phpinspect-pctx-whitespace-before ,ctx))))
 
 (defmacro phpinspect-with-parse-context (ctx &rest body)
-  "Set the currently active parce context to CTX and execute body.
-
-If BODY signals an error, `phpinspect-pctx-cancel' is called in
-an attempt to revert all changes made to the metadata tree while
-parsing incrementally.
-
-The error signal is not intercepted and will still need to be
-handled by the code using this macro."
+  "Set the currently active parce context to CTX and execute body."
   (declare (indent 1))
   `(dlet ((phpinspect-parse-context ,ctx))
      (progn ,@body)))
diff --git a/test/phpinspect-test.el b/test/phpinspect-test.el
index 7bc10aaa9d..4f43867901 100644
--- a/test/phpinspect-test.el
+++ b/test/phpinspect-test.el
@@ -329,7 +329,6 @@ class FlufferUpper
 (load-file (concat phpinspect-test-directory "/test-bmap.el"))
 (load-file (concat phpinspect-test-directory "/test-resolvecontext.el"))
 (load-file (concat phpinspect-test-directory "/test-parser.el"))
-(load-file (concat phpinspect-test-directory "/test-parse-context.el"))
 (load-file (concat phpinspect-test-directory "/test-splayt.el"))
 (load-file (concat phpinspect-test-directory "/test-pipeline.el"))
 (load-file (concat phpinspect-test-directory "/test-meta.el"))
diff --git a/test/test-parse-context.el b/test/test-parse-context.el
deleted file mode 100644
index 300eb18697..0000000000
--- a/test/test-parse-context.el
+++ /dev/null
@@ -1,50 +0,0 @@
-;;; phpinspect-test.el --- Unit tests for phpinspect.el  -*- lexical-binding: 
t; -*-
-
-;; Copyright (C) 2021-2023 Free Software Foundation, Inc.
-
-;; Author: Hugo Thunnissen <de...@hugot.nl>
-
-;; This program is free software; you can redistribute it and/or modify
-;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation, either version 3 of the License, or
-;; (at your option) any later version.
-
-;; This program is distributed in the hope that it will be useful,
-;; but WITHOUT ANY WARRANTY; without even the implied warranty of
-;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-;; GNU General Public License for more details.
-
-;; You should have received a copy of the GNU General Public License
-;; along with this program.  If not, see <https://www.gnu.org/licenses/>.
-
-;;; Commentary:
-
-;;
-
-;;; Code:
-
-(require 'ert)
-(require 'phpinspect-parse-context)
-(require 'phpinspect-meta)
-(require 'phpinspect-bmap)
-
-;; (ert-deftest phpinspect-pctx-cancel ()
-;;   (let ((meta (phpinspect-make-meta nil 10 20 "    " 'token 'overlay nil))
-;;         (pctx (phpinspect-make-pctx :bmap (phpinspect-make-bmap))))
-;;     (phpinspect-with-parse-context pctx
-;;       (phpinspect-meta-with-changeset meta
-;;         (setf (phpinspect-meta-absolute-start meta) 222)
-;;         (setf (phpinspect-meta-absolute-end meta) 1234)
-;;         (phpinspect-meta-set-parent meta (phpinspect-make-meta nil 1 2000 
"" 'parent-token))))
-
-;;     (should (= 222 (phpinspect-meta-start meta)))
-;;     (should (= 1234 (phpinspect-meta-end meta)))
-;;     (should (phpinspect-meta-parent meta))
-;;     (should (= 221 (phpinspect-meta-parent-offset meta)))
-
-;;     (phpinspect-pctx-cancel pctx)
-
-;;     (should (= 10 (phpinspect-meta-start meta)))
-;;     (should (= 20 (phpinspect-meta-end meta)))
-;;     (should-not (phpinspect-meta-parent meta))
-;;     (should-not (phpinspect-meta-parent-offset meta))))

Reply via email to