summaryrefslogtreecommitdiff
path: root/test/lisp/man-tests.el
diff options
context:
space:
mode:
Diffstat (limited to 'test/lisp/man-tests.el')
-rw-r--r--test/lisp/man-tests.el18
1 files changed, 18 insertions, 0 deletions
diff --git a/test/lisp/man-tests.el b/test/lisp/man-tests.el
index 140482ee622..ecda189b6b2 100644
--- a/test/lisp/man-tests.el
+++ b/test/lisp/man-tests.el
@@ -161,6 +161,24 @@ DESCRIPTION
(let ((button (button-at (match-beginning 0))))
(should (and button (eq 'Man-xref-header-file (button-type button))))))))))
+(ert-deftest man-tests-Man-translate-references ()
+ (should (equal (Man-translate-references "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")
+ (if (memq system-type '(ms-dos windows-nt))
+ "\";id\""
+ "\\;id")))
+ (should (equal (Man-translate-references "-k basename")
+ (if (memq system-type '(ms-dos windows-nt))
+ "\"-k\" \"basename\""
+ "-k basename"))))
+
(provide 'man-tests)
;;; man-tests.el ends here