From 2b6c5fb2953a9134064c32f67674ecd41db6c26a Mon Sep 17 00:00:00 2001 From: Benjamin Riefenstahl Date: Mon, 9 Aug 2021 14:14:33 +0200 Subject: Add test for nnrss * test/lisp/gnus/nnrss-tests.el (test-nnrss-xml): New test (bug#34685). --- test/lisp/gnus/nnrss-tests.el | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'test/lisp/gnus') diff --git a/test/lisp/gnus/nnrss-tests.el b/test/lisp/gnus/nnrss-tests.el index 9821ec76fb4..01b374a2f63 100644 --- a/test/lisp/gnus/nnrss-tests.el +++ b/test/lisp/gnus/nnrss-tests.el @@ -26,4 +26,20 @@ (should (equal (nnrss-normalize-date "2004-09-17T05:09:49.001+00:00") "Fri, 17 Sep 2004 05:09:49 +0000"))) +(defconst test-nnrss-xml + '(rss + ((version . "2.0") + (xmlns:dc . "http://purl.org/dc/elements/1.1/")) + (channel + ((xmlns:content . "http://purl.org/rss/1.0/modules/content/"))))) + +(ert-deftest test-nnrss-namespace-top () + (should (equal (nnrss-get-namespace-prefix + test-nnrss-xml "http://purl.org/dc/elements/1.1/") + "dc:"))) +(ert-deftest test-nnrss-namespace-inner () + (should (equal (nnrss-get-namespace-prefix + test-nnrss-xml "http://purl.org/rss/1.0/modules/content/") + "content:"))) + ;;; nnrss-tests.el ends here -- cgit v1.2.3