Skip to content

Commit

Permalink
move the (unimpressive) tests to a separate file
Browse files Browse the repository at this point in the history
  • Loading branch information
nicferrier committed Oct 25, 2014
1 parent 3438a2c commit 6499810
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 17 deletions.
23 changes: 23 additions & 0 deletions tests.el
@@ -0,0 +1,23 @@
;;; tests for wikidoc -*- lexical-binding: t -*-

(require 'ert)
(require 'wikidoc)

(ert-deftest wikidoc-test-convert-line ()
"Can we convert lines with lisp refs and arguments?"
(let ((l '("This is a line of documentation with `lisp-references'" .
"This is a line of documentation with [[lisp-references]]")))
(should
(equal
(cdr l)
(wikidoc--convert-line (car l)))))
(let ((l
'("A line of doc with 2 args of car and cdr: CAR and CDR" .
"A line of doc with 2 args of car and cdr: //car// and //cdr//")))
(should
(equal
(cdr l)
(wikidoc--convert-line (car l) '(car cdr))))))


;;; tests.el ends here
17 changes: 0 additions & 17 deletions wikidoc.el
Expand Up @@ -56,7 +56,6 @@

;;; Code:

(require 'ert)
(eval-when-compile (require 'cl))

;;;###autoload
Expand Down Expand Up @@ -124,22 +123,6 @@ The list should be of symbols, not strings."
line t nil)
line))))

(ert-deftest wikidoc-test-convert-line ()
"Can we convert lines with lisp refs and arguments?"
(let ((l '("This is a line of documentation with `lisp-references'" .
"This is a line of documentation with [[lisp-references]]")))
(should
(equal
(cdr l)
(wikidoc--convert-line (car l)))))
(let ((l
'("A line of doc with 2 args of car and cdr: CAR and CDR" .
"A line of doc with 2 args of car and cdr: //car// and //cdr//")))
(should
(equal
(cdr l)
(wikidoc--convert-line (car l) '(car cdr))))))

(defun wikidoc--convert (str &optional arguments-to-mangle)
"Convert function documentation type doc STR to creole.
Expand Down

0 comments on commit 6499810

Please sign in to comment.