diff options
| author | Lars Ingebrigtsen | 2019-07-30 17:01:35 +0200 |
|---|---|---|
| committer | Lars Ingebrigtsen | 2019-07-31 21:47:29 +0200 |
| commit | 6a87416d61794af1bdde80f696a0595f215e7baa (patch) | |
| tree | 4a52ed25ae6b70d3cccaf45047241f9fe1274722 /test | |
| parent | 14c0a63e79ebb5c7445b3a4d2fe6e98e4a707765 (diff) | |
| download | emacs-6a87416d61794af1bdde80f696a0595f215e7baa.tar.gz emacs-6a87416d61794af1bdde80f696a0595f215e7baa.zip | |
Use iso8601-parse in nnrss
* lisp/gnus/nnrss.el (nnrss-normalize-date): Use iso8601-parse
instead of hand-rolled parser.
* test/lisp/gnus/nnrss-tests.el: New file.
Diffstat (limited to 'test')
| -rw-r--r-- | test/lisp/gnus/nnrss-tests.el | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/test/lisp/gnus/nnrss-tests.el b/test/lisp/gnus/nnrss-tests.el new file mode 100644 index 00000000000..184c592ea22 --- /dev/null +++ b/test/lisp/gnus/nnrss-tests.el | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | ;;; nnrss-tests.el --- tests for gnus/nnrss.el -*- lexical-binding:t -*- | ||
| 2 | |||
| 3 | ;; Copyright (C) 2019 Free Software Foundation, Inc. | ||
| 4 | |||
| 5 | ;; This file is part of GNU Emacs. | ||
| 6 | |||
| 7 | ;; GNU Emacs is free software: you can redistribute it and/or modify | ||
| 8 | ;; it under the terms of the GNU General Public License as published by | ||
| 9 | ;; the Free Software Foundation, either version 3 of the License, or | ||
| 10 | ;; (at your option) any later version. | ||
| 11 | |||
| 12 | ;; GNU Emacs is distributed in the hope that it will be useful, | ||
| 13 | ;; but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
| 14 | ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | ||
| 15 | ;; GNU General Public License for more details. | ||
| 16 | |||
| 17 | ;; You should have received a copy of the GNU General Public License | ||
| 18 | ;; along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. | ||
| 19 | |||
| 20 | ;;; Code: | ||
| 21 | |||
| 22 | (require 'ert) | ||
| 23 | (require 'nnrss) | ||
| 24 | |||
| 25 | (ert-deftest test-nnrss-normalize () | ||
| 26 | (should (equal (nnrss-normalize-date "2004-09-17T05:09:49.001+00:00") | ||
| 27 | "Fri, 17 Sep 2004 05:09:49 +0000"))) | ||
| 28 | |||
| 29 | ;;; nnrss-tests.el ends here | ||