diff options
author | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-01-13 17:08:58 +0100 |
---|---|---|
committer | Nicolas Goaziou <mail@nicolasgoaziou.fr> | 2016-01-13 17:08:58 +0100 |
commit | 6baece62fc6666f331c00284a7c53a09fa3794c8 (patch) | |
tree | aa6152fe8e94eb7ae12d1eb0ad427ee8310c4f40 | |
parent | 2520fd654a65fe607a8ca726d7fc8fb5be07d258 (diff) | |
download | org-mode-6baece62fc6666f331c00284a7c53a09fa3794c8.tar.gz |
org-feed: Fix failing test
testing/lisp/test-org-feed.el (test-org-feed/fill-template): Fix test
when called from an environment with another locale.
-rw-r--r-- | testing/lisp/test-org-feed.el | 28 |
1 files changed, 16 insertions, 12 deletions
diff --git a/testing/lisp/test-org-feed.el b/testing/lisp/test-org-feed.el index de95c86..d28abb9 100644 --- a/testing/lisp/test-org-feed.el +++ b/testing/lisp/test-org-feed.el @@ -44,31 +44,35 @@ (equal (format-time-string (org-time-stamp-format nil nil)) (org-feed-format-entry nil "%t" nil))) (should - (equal "<2016-01-02 Sat>" - (org-feed-format-entry - '(:pubDate "Sat, 02 Jan 2016 12:00:00 +0000") "%t" nil))) + (string-match-p + "<2016-01-02 \\S-+>" + (org-feed-format-entry + '(:pubDate "Sat, 02 Jan 2016 12:00:00 +0000") "%t" nil))) (should (equal (format-time-string (org-time-stamp-format t nil)) (org-feed-format-entry nil "%T" nil))) (should - (equal "<2016-01-02 Sat 12:00>" - (org-feed-format-entry - '(:pubDate "Sat, 02 Jan 2016 12:00:00 +0000") "%T" nil))) + (string-match-p + "<2016-01-02 \\S-+ 12:00>" + (org-feed-format-entry + '(:pubDate "Sat, 02 Jan 2016 12:00:00 +0000") "%T" nil))) ;; %u and %U placeholders. (should (equal (format-time-string (org-time-stamp-format nil t)) (org-feed-format-entry nil "%u" nil))) (should - (equal "[2016-01-02 Sat]" - (org-feed-format-entry - '(:pubDate "Sat, 02 Jan 2016 12:00:00 +0000") "%u" nil))) + (string-match-p + "[2016-01-02 \\S-+]" + (org-feed-format-entry + '(:pubDate "Sat, 02 Jan 2016 12:00:00 +0000") "%u" nil))) (should (equal (format-time-string (org-time-stamp-format t t)) (org-feed-format-entry nil "%U" nil))) (should - (equal "[2016-01-02 Sat 12:00]" - (org-feed-format-entry - '(:pubDate "Sat, 02 Jan 2016 12:00:00 +0000") "%U" nil))) + (string-match-p + "[2016-01-02 \\S-+ 12:00]" + (org-feed-format-entry + '(:pubDate "Sat, 02 Jan 2016 12:00:00 +0000") "%U" nil))) ;; %h placeholder. Make sure sexp placeholders are not expanded ;; when they are inserted through this one. (should |