diff options
| author | Glenn Morris | 2016-01-27 20:32:45 -0500 |
|---|---|---|
| committer | Glenn Morris | 2016-01-27 20:32:45 -0500 |
| commit | c261ef3e9421e868185e3d79dbbf03d28584decc (patch) | |
| tree | dfb64b7ef87219dee0de08afdaf182c76146cb1c /test/lisp | |
| parent | ce0eee83854a23985a476f72306c9cc04eb8747e (diff) | |
| download | emacs-c261ef3e9421e868185e3d79dbbf03d28584decc.tar.gz emacs-c261ef3e9421e868185e3d79dbbf03d28584decc.zip | |
* test/lisp/vc/vc-hg.el: Move from test/automated/.
; Changed directory structures across branches - the gift that keeps on giving.
Diffstat (limited to 'test/lisp')
| -rw-r--r-- | test/lisp/vc/vc-hg.el | 58 |
1 files changed, 58 insertions, 0 deletions
diff --git a/test/lisp/vc/vc-hg.el b/test/lisp/vc/vc-hg.el new file mode 100644 index 00000000000..ba966598c4d --- /dev/null +++ b/test/lisp/vc/vc-hg.el | |||
| @@ -0,0 +1,58 @@ | |||
| 1 | ;;; vc-hg.el --- tests for vc/vc-hg.el | ||
| 2 | |||
| 3 | ;; Copyright (C) 2016 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; Author: Dmitry Gutov <dgutov@yandex.ru> | ||
| 6 | ;; Maintainer: emacs-devel@gnu.org | ||
| 7 | |||
| 8 | ;; This file is part of GNU Emacs. | ||
| 9 | |||
| 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. | ||
| 14 | |||
| 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. | ||
| 19 | |||
| 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/>. | ||
| 22 | |||
| 23 | ;;; Commentary: | ||
| 24 | |||
| 25 | ;;; Code: | ||
| 26 | |||
| 27 | (require 'vc-hg) | ||
| 28 | (require 'vc-annotate) | ||
| 29 | |||
| 30 | (ert-deftest vc-hg-annotate-extract-revision-at-line-with-filename () | ||
| 31 | ;; with filename | ||
| 32 | (with-temp-buffer | ||
| 33 | (save-excursion (insert "215 2007-06-20 CONTENTS:")) | ||
| 34 | (should (equal (vc-hg-annotate-extract-revision-at-line) | ||
| 35 | (cons | ||
| 36 | "215" | ||
| 37 | (expand-file-name "CONTENTS")))))) | ||
| 38 | |||
| 39 | (ert-deftest vc-hg-annotate-extract-revision-at-line-with-user () | ||
| 40 | (with-temp-buffer | ||
| 41 | (save-excursion (insert " gerv 107217 2012-09-17:")) | ||
| 42 | (should (equal (vc-hg-annotate-extract-revision-at-line) | ||
| 43 | "107217")))) | ||
| 44 | |||
| 45 | (ert-deftest vc-hg-annotate-extract-revision-at-line-with-both () | ||
| 46 | (with-temp-buffer | ||
| 47 | (save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:")) | ||
| 48 | (should (equal (vc-hg-annotate-extract-revision-at-line) | ||
| 49 | (cons | ||
| 50 | "218075" | ||
| 51 | (expand-file-name "CLOBBER")))))) | ||
| 52 | |||
| 53 | (ert-deftest vc-hg-annotate-time () | ||
| 54 | (with-temp-buffer | ||
| 55 | (save-excursion (insert "philringnalda 218075 2014-11-28 CLOBBER:")) | ||
| 56 | (should (floatp (vc-hg-annotate-time))))) | ||
| 57 | |||
| 58 | ;;; vc-hg.el ends here | ||