1 ;;; vc-hg.el --- tests for vc/vc-hg.el
3 ;; Copyright (C) 2016 Free Software Foundation, Inc.
5 ;; Author: Dmitry Gutov <dgutov@yandex.ru>
6 ;; Maintainer: emacs-devel@gnu.org
8 ;; This file is part of GNU Emacs.
10 ;; GNU Emacs is free software: you can redistribute it and/or modify
11 ;; it under the terms of the GNU General Public License as published by
12 ;; the Free Software Foundation, either version 3 of the License, or
13 ;; (at your option) any later version.
15 ;; GNU Emacs is distributed in the hope that it will be useful,
16 ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
17 ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 ;; GNU General Public License for more details.
20 ;; You should have received a copy of the GNU General Public License
21 ;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
28 (require 'vc-annotate
)
30 (ert-deftest vc-hg-annotate-extract-revision-at-line-with-filename
()
33 (save-excursion (insert "215 2007-06-20 CONTENTS:"))
34 (should (equal (vc-hg-annotate-extract-revision-at-line)
37 (expand-file-name "test/automated/CONTENTS"
38 source-directory
))))))
40 (ert-deftest vc-hg-annotate-extract-revision-at-line-with-user
()
42 (save-excursion (insert " gerv 107217 2012-09-17:"))
43 (should (equal (vc-hg-annotate-extract-revision-at-line)
46 (ert-deftest vc-hg-annotate-extract-revision-at-line-with-both
()
48 (save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:"))
49 (should (equal (vc-hg-annotate-extract-revision-at-line)
52 (expand-file-name "test/automated/CLOBBER"
53 source-directory
))))))
55 (ert-deftest vc-hg-annotate-time
()
57 (save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:"))
58 (should (floatp (vc-hg-annotate-time)))))
60 ;;; vc-hg.el ends here