Ver código fonte

testing/lisp/test-org-archive.el: Fix test

* testing/lisp/test-org-archive.el
(test-org-archive/datetree): Fix test for locales that don't use
English weekday names.
Christian Garbs 4 anos atrás
pai
commit
d02c0218ef
1 arquivos alterados com 4 adições e 4 exclusões
  1. 4 4
      testing/lisp/test-org-archive.el

+ 4 - 4
testing/lisp/test-org-archive.el

@@ -63,7 +63,7 @@
     ;; Test in buffer target with no additional subheadings...
     (should
      (string-match-p
-      (regexp-quote "*** 2020-07-05 Sunday\n**** a")
+      (regexp-quote (format-time-string "*** 2020-07-05 %A\n**** a"))
       (org-test-with-temp-text-in-file "* a\n"
 	(let ((org-archive-location "::datetree/"))
 	  (org-archive-subtree)
@@ -71,7 +71,7 @@
     ;; ... and with `org-odd-levels-only' non-nil.
     (should
      (string-match-p
-      (regexp-quote "***** 2020-07-05 Sunday\n******* a")
+      (regexp-quote (format-time-string "***** 2020-07-05 %A\n******* a"))
       (org-test-with-temp-text-in-file "* a\n"
 	(let ((org-archive-location "::datetree/")
 	      (org-odd-levels-only t))
@@ -80,7 +80,7 @@
     ;; Test in buffer target with an additional subheading...
     (should
      (string-match-p
-      (regexp-quote "*** 2020-07-05 Sunday\n**** a\n***** b")
+      (regexp-quote (format-time-string "*** 2020-07-05 %A\n**** a\n***** b"))
       (org-test-with-temp-text-in-file "* b\n"
 	(let ((org-archive-location "::datetree/* a"))
 	  (org-archive-subtree)
@@ -88,7 +88,7 @@
     ;; ... and with `org-odd-levels-only' non-nil.
     (should
      (string-match-p
-      (regexp-quote "***** 2020-07-05 Sunday\n******* a\n********* b")
+      (regexp-quote (format-time-string "***** 2020-07-05 %A\n******* a\n********* b"))
       (org-test-with-temp-text-in-file "* b\n"
 	(let ((org-archive-location "::datetree/* a")
 	      (org-odd-levels-only t))