summaryrefslogtreecommitdiff
path: root/lisp/rot13.el
diff options
context:
space:
mode:
authorSimen Heggestøyl <simenheg@gmail.com>2016-11-17 19:19:59 +0100
committerSimen Heggestøyl <simenheg@gmail.com>2016-11-17 19:19:59 +0100
commitedda93cfb1a1da27adbda6bf43d826e492a135e5 (patch)
tree7bab19d098ce8d8b7eb69efc1bc821f22bb67fb0 /lisp/rot13.el
parent6653bb45d3697c9372cc77773c49f52399740b51 (diff)
downloademacs-edda93cfb1a1da27adbda6bf43d826e492a135e5.tar.gz
Add tests for rot13.el
* lisp/rot13.el (rot13): Docstring correction. * test/lisp/rot13-tests.el: New file with tests for rot13.el.
Diffstat (limited to 'lisp/rot13.el')
-rw-r--r--lisp/rot13.el5
1 files changed, 4 insertions, 1 deletions
diff --git a/lisp/rot13.el b/lisp/rot13.el
index ee4f51d7ff3..55725473eaa 100644
--- a/lisp/rot13.el
+++ b/lisp/rot13.el
@@ -63,7 +63,10 @@
;;;###autoload
(defun rot13 (object &optional start end)
- "Return ROT13 encryption of OBJECT, a buffer or string."
+ "ROT13 encrypt OBJECT, a buffer or string.
+If OBJECT is a buffer, encrypt the region between START and END.
+If OBJECT is a string, encrypt it in its entirety, ignoring START
+and END, and return the encrypted string."
(if (bufferp object)
(with-current-buffer object
(rot13-region start end))