From ac3ff0e346181daf6c1c5be10fddbd855ae49c9d Mon Sep 17 00:00:00 2001 From: zorkow Date: Wed, 26 Feb 2025 09:42:14 +0100 Subject: [PATCH 1/3] update diff tool --- testsuite/scripts/test-diff.el | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/testsuite/scripts/test-diff.el b/testsuite/scripts/test-diff.el index bf0c7d8be..ccdf31614 100644 --- a/testsuite/scripts/test-diff.el +++ b/testsuite/scripts/test-diff.el @@ -17,7 +17,7 @@ ;;; (defun jest-find-expected () - (block find-fail-block + (cl-block find-fail-block (let ((expected (condition-case nil (search-forward "Expected value") (error nil)))) @@ -31,19 +31,19 @@ (defun jest-find-fail () ;; Returns start end for actual and expected and position of fail o/w nil. (interactive) - (block find-fail-block + (cl-block find-fail-block (let ((pos (condition-case nil (search-forward "●" nil t) (error nil)))) (when (null pos) - (return-from find-fail-block nil)) + (cl-return-from find-fail-block nil)) (let ((expected (jest-find-expected)) (actual (condition-case nil (search-forward "Received:") (error nil))) ) (when (or (null actual) (null expected)) - (return-from find-fail-block nil)) + (cl-return-from find-fail-block nil)) (let* ((beg1 (progn (goto-char actual) (search-forward "\"") @@ -88,7 +88,7 @@ (condition-case nil (search-forward "Summary of all failing tests") (error (beginning-of-buffer))) - (do ((fail (jest-find-fail) (jest-find-fail))) + (cl-do ((fail (jest-find-fail) (jest-find-fail))) ((null fail) nil) (print fail) (append-to-buffer bufferA (caadr fail) (cdadr fail)) @@ -102,7 +102,7 @@ ;;; Go to position where you want the next test inserted. (defun jest-replace-expected-for-actual () (interactive) - (block expected-block + (cl-block expected-block (other-window 1) (let* ((fail (jest-find-fail)) (actual (car (fourth fail))) From 6e61db2bcee0d41925865a062ebb6581aba39d75 Mon Sep 17 00:00:00 2001 From: zorkow Date: Fri, 28 Nov 2025 13:05:37 +0100 Subject: [PATCH 2/3] ensure cl-lib is loaded for jest diff tools --- testsuite/scripts/test-diff.el | 1 + 1 file changed, 1 insertion(+) diff --git a/testsuite/scripts/test-diff.el b/testsuite/scripts/test-diff.el index ccdf31614..109675aaa 100644 --- a/testsuite/scripts/test-diff.el +++ b/testsuite/scripts/test-diff.el @@ -5,6 +5,7 @@ ;;; Copyright (c) 2024 The MathJax Consortium (require 'ediff) +(require 'cl-lib) ;;; Jest Tests ;;; ========== From c7161417ad326a534f2ef1d6d3242310fa2f303a Mon Sep 17 00:00:00 2001 From: zorkow Date: Fri, 28 Nov 2025 13:07:52 +0100 Subject: [PATCH 3/3] update copyright --- testsuite/scripts/test-diff.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/testsuite/scripts/test-diff.el b/testsuite/scripts/test-diff.el index 109675aaa..5476156d2 100644 --- a/testsuite/scripts/test-diff.el +++ b/testsuite/scripts/test-diff.el @@ -2,7 +2,7 @@ ;;; Tools for working with Jest tests in Emacs. ;;; ;;; -;;; Copyright (c) 2024 The MathJax Consortium +;;; Copyright (c) 2024-5 The MathJax Consortium (require 'ediff) (require 'cl-lib)