[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/julia-mode 347c5c11c5 14/22: cleanup tests, bit more verbo
|
From: |
ELPA Syncer |
|
Subject: |
[nongnu] elpa/julia-mode 347c5c11c5 14/22: cleanup tests, bit more verbose to compare matched string |
|
Date: |
Thu, 4 May 2023 11:00:52 -0400 (EDT) |
branch: elpa/julia-mode
commit 347c5c11c537808e7e570f88303a60183b7826c8
Author: Tamás K. Papp <tkpapp@gmail.com>
Commit: Tamás K. Papp <tkpapp@gmail.com>
cleanup tests, bit more verbose to compare matched string
---
julia-mode-tests.el | 22 +++++++++++-----------
1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/julia-mode-tests.el b/julia-mode-tests.el
index 51c0db2f12..e77cf03818 100644
--- a/julia-mode-tests.el
+++ b/julia-mode-tests.el
@@ -884,23 +884,23 @@ end" 'end-of-defun "n == 0" "return fact(x)[ \n]+end"
'end 2))
;;;
(defun julia--find-latex (contents position)
- "Find bounds of LaTeX symbol in CONTENTS with point at POSITION."
+ "Find bounds of LaTeX symbol in CONTENTS with point at POSITION, `'((start .
end) string)'."
(with-temp-buffer
(julia-mode)
(insert contents)
(goto-char position)
- (cons (julia--latexsub-start-symbol) (julia--latexsub-end-symbol))))
+ (let* ((beg (julia--latexsub-start-symbol))
+ (end (julia-mode--latexsubs-longest-partial-end beg)))
+ (list (cons beg end) (buffer-substring beg end)))))
(ert-deftest julia--test-find-latex ()
- (should (equal (julia--find-latex "\\alpha " 7) (cons 1 7)))
- (should (equal (julia--find-latex "\\alpha " 3) (cons 1 7)))
- (should (equal (julia--find-latex "x\\alpha " 8) (cons 2 8)))
- (should (equal (julia--find-latex "x\\alpha " 3) (cons 2 8)))
- ;; There is no valid substitution for \alpha(, but there could
- ;; be. julia-mode-latexsub-completion-at-point-before will still
- ;; give correct completion in this situation.
- (should (equal (julia--find-latex "\\kappa\\alpha(" 13) (cons 7 14)))
- (should (equal (julia--find-latex "\\kappa\\alpha(" 4) (cons 1 7))))
+ (should (equal (julia--find-latex "\\alpha " 7) '((1 . 7) "\\alpha")))
+ (should (equal (julia--find-latex "\\alpha " 3) '((1 . 7) "\\alpha")))
+ (should (equal (julia--find-latex "x\\alpha " 8) '((2 . 8) "\\alpha")))
+ (should (equal (julia--find-latex "x\\alpha " 3) '((2 . 8) "\\alpha")))
+ (should (equal (julia--find-latex "\\kappa\\alpha(" 13) '((7 . 13)
"\\alpha")))
+ (should (equal (julia--find-latex "\\kappa\\alpha(" 4) '((1 . 7) "\\kappa")))
+ (should (equal (julia--find-latex "α\\hat_mean" 3) '((2 . 6) "\\hat"))))
;;;
;;; abbrev tests
- [nongnu] elpa/julia-mode 307b4afa9a 03/22: Create julia-mode-abbrev-table filled with latexsub abbrevs, (continued)
- [nongnu] elpa/julia-mode 307b4afa9a 03/22: Create julia-mode-abbrev-table filled with latexsub abbrevs, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode d52cb3e885 10/22: Provide alternative to indent-for-tab-command for use with company, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 77ff4f1146 15/22: comment code, fix docstring width, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode d684bf172a 17/22: further byte compilation docstring warning fixes, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 759e8a8e57 18/22: Merge branch 'master' into tp/find-latexsub-end, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode c87949315f 02/22: Remove hack for indentation in strings, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 4d2047666f 04/22: Remove old latexsub implementation, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 0160fecf90 05/22: Override TAB to do completion in julia-mode buffers, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode f92227a87f 09/22: Fix whitespace, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode f359fd01c5 12/22: Add predicate to "around" latex symbol completion, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 347c5c11c5 14/22: cleanup tests, bit more verbose to compare matched string,
ELPA Syncer <=
- [nongnu] elpa/julia-mode 74e13dc460 16/22: use cl-flet, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 15326d6992 08/22: Remove extraneous -mode suffix from julia-- functions, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 016721004c 19/22: Merge pull request #185 from JuliaEditorSupport/tp/find-latexsub-end, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 8f3afcb99e 21/22: ignore warnings on snaphot, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode f854352d76 11/22: Fix byte-compilation warnings for company-integration code, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 7e301f4414 22/22: Merge pull request #186 from tpapp/tp/remove-emacs-25, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode d2b28644d2 06/22: Stop overriding regex in julia-mode-abbrev-table, ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode c8e33f81fa 13/22: Use a hash table to look up where symbols end., ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode a39c9d2dd3 07/22: Automatically substitute LaTeX symbols after completion., ELPA Syncer, 2023/05/04
- [nongnu] elpa/julia-mode 26a1c2bfa9 20/22: require Emacs 26, ELPA Syncer, 2023/05/04