]> git.eshelyaron.com Git - emacs.git/commitdiff
Fix man-tests.el
authorEli Zaretskii <eliz@gnu.org>
Thu, 11 Jan 2024 15:27:04 +0000 (17:27 +0200)
committerEli Zaretskii <eliz@gnu.org>
Thu, 11 Jan 2024 15:27:04 +0000 (17:27 +0200)
* test/lisp/man-tests.el (man-tests-Man-translate-references): Fix
test for MS-Windows and MS-DOS.

test/lisp/man-tests.el

index 11f5f805e43faac614257fac56606328755a1e62..ecda189b6b2e00b59a696b1390a1031d4e1691a6 100644 (file)
@@ -163,15 +163,21 @@ DESCRIPTION
 
 (ert-deftest man-tests-Man-translate-references ()
   (should (equal (Man-translate-references "basename")
-                 "basename"))
+                 (if (memq system-type '(ms-dos windows-nt))
+                     "\"basename\""
+                     "basename")))
   (should (equal (Man-translate-references "basename(3)")
                  "3 basename"))
   (should (equal (Man-translate-references "basename(3v)")
                  "3v basename"))
   (should (equal (Man-translate-references ";id")
-                 "\\;id"))
+                 (if (memq system-type '(ms-dos windows-nt))
+                     "\";id\""
+                   "\\;id")))
   (should (equal (Man-translate-references "-k basename")
-                 "-k basename")))
+                 (if (memq system-type '(ms-dos windows-nt))
+                     "\"-k\" \"basename\""
+                   "-k basename"))))
 
 (provide 'man-tests)