aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
authorBasil L. Contovounesios2023-06-12 00:23:56 +0100
committerBasil L. Contovounesios2023-06-17 16:36:27 +0100
commitfef27d28fa70b52b6dc302d0b3ae1687499dd499 (patch)
treeedba954a9134bc55d4fc0f1bdac2e3b8d3c1507c /test
parentf47cf7110edf94b7fb7c7a5ffa97e817f7a0e9d1 (diff)
downloademacs-fef27d28fa70b52b6dc302d0b3ae1687499dd499.tar.gz
emacs-fef27d28fa70b52b6dc302d0b3ae1687499dd499.zip
Fix more shy group regexps
These issues were caught by modified versions of the GNU ELPA packages xr and relint: - https://github.com/mattiase/xr/pull/6 - https://github.com/mattiase/relint/pull/14 * lisp/gnus/gnus-art.el (gnus-parse-news-url): Remove redundant numbered group and calls to match-string. * lisp/progmodes/c-ts-mode.el (c-ts-mode--c-or-c++-regexp): Fix shy group mistyped as optional colon (bug#64019#29). * lisp/vc/vc-git.el (vc-git-annotate-time): Ditto. Also fix timezone parsing by using iso8601-parse (bug#64069). * test/lisp/vc/vc-git-tests.el (vc-git-test-annotate-time): New test.
Diffstat (limited to 'test')
-rw-r--r--test/lisp/vc/vc-git-tests.el17
1 files changed, 17 insertions, 0 deletions
diff --git a/test/lisp/vc/vc-git-tests.el b/test/lisp/vc/vc-git-tests.el
index f12c5d3434b..b331b77cf01 100644
--- a/test/lisp/vc/vc-git-tests.el
+++ b/test/lisp/vc/vc-git-tests.el
@@ -64,4 +64,21 @@
64 (actual-output (vc-git--program-version))) 64 (actual-output (vc-git--program-version)))
65 (should (equal actual-output expected-output)))) 65 (should (equal actual-output expected-output))))
66 66
67(ert-deftest vc-git-test-annotate-time ()
68 "Test `vc-git-annotate-time'."
69 (require 'vc-annotate)
70 (with-temp-buffer
71 (insert "\
7200000000 (Foo Bar 2023-06-14 1) a
7300000001 (Foo Bar 2023-06-14 00:00:00 -0130 2) b
7400000002 (Foo Bar 2023-06-14 00:00:00 +0145 3) c
7500000003 (Foo Bar 2023-06-14 00:00:00 4) d
7600000004 (Foo Bar 0-0-0 5) \n")
77 (goto-char (point-min))
78 (should (floatp (vc-git-annotate-time)))
79 (should (> (vc-git-annotate-time)
80 (vc-git-annotate-time)))
81 (should-not (vc-git-annotate-time))
82 (should-not (vc-git-annotate-time))))
83
67;;; vc-git-tests.el ends here 84;;; vc-git-tests.el ends here