diff options
| author | Simen Heggestøyl | 2016-11-17 19:19:59 +0100 |
|---|---|---|
| committer | Simen Heggestøyl | 2016-11-17 19:19:59 +0100 |
| commit | edda93cfb1a1da27adbda6bf43d826e492a135e5 (patch) | |
| tree | 7bab19d098ce8d8b7eb69efc1bc821f22bb67fb0 /lisp | |
| parent | 6653bb45d3697c9372cc77773c49f52399740b51 (diff) | |
| download | emacs-edda93cfb1a1da27adbda6bf43d826e492a135e5.tar.gz emacs-edda93cfb1a1da27adbda6bf43d826e492a135e5.zip | |
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')
| -rw-r--r-- | lisp/rot13.el | 5 |
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 @@ | |||
| 63 | 63 | ||
| 64 | ;;;###autoload | 64 | ;;;###autoload |
| 65 | (defun rot13 (object &optional start end) | 65 | (defun rot13 (object &optional start end) |
| 66 | "Return ROT13 encryption of OBJECT, a buffer or string." | 66 | "ROT13 encrypt OBJECT, a buffer or string. |
| 67 | If OBJECT is a buffer, encrypt the region between START and END. | ||
| 68 | If OBJECT is a string, encrypt it in its entirety, ignoring START | ||
| 69 | and END, and return the encrypted string." | ||
| 67 | (if (bufferp object) | 70 | (if (bufferp object) |
| 68 | (with-current-buffer object | 71 | (with-current-buffer object |
| 69 | (rot13-region start end)) | 72 | (rot13-region start end)) |