Skip to content
Newer
Older
100644 42 lines (30 sloc) 1.88 KB
f2771df @technomancy Move clojure-test-maybe-enable inside autoloaded progn.
technomancy authored
1 (ns clojure-mode.test
2 (:use [clojure.test]))
033cf98 @technomancy Added test file.
technomancy authored
3
4 (deftest test-str
5 (is (= "o hai" (str "o" "hai"))))
6
7 (deftest test-errs
8 (is (({} :hi)))
9 (is (str "This one doesn't actually error."))
10 (is (= 0 (/ 9 0))))
11
12 (deftest test-bad-math
13 (is (= 0 (* 8 2)))
14 (is (= 5 (+ 2 2))))
15
16 (deftest test-something-that-actually-works
17 (is (= 1 1)))
18
19 ;; For debugging
20 ;; (map #(cons (str (:name (meta %))) (:status (meta %))) (vals (ns-interns *ns*)))
21 ;; (insert (pp the-result))
22
23 (comment ;; for indentation
24 (with-hi heya
25 somebuddy)
26
27 (deftoggle cap
28 gabba)
29
30 (couch/with-db hi
31 your-db)
32
33 (clo/defguppy gurgle
ccdea07 @stuartsierra Add function with long docstring to test clojure-fill-dosctring
stuartsierra authored
34 minnow))
35
36 (defn say-hello
37 "This is a long doc string to test clojure-fill-docstring. Lorem ipsum dolor sit amet, consectetur adipiscing elit. Phasellus sed nunc luctus leo ultricies semper. Nullam id tempor mi. Cras adipiscing scelerisque purus, at semper magna tincidunt ut. Sed eget dolor vitae enim feugiat porttitor. Etiam vulputate pulvinar lacinia. Nam vitae nisl sit amet libero pulvinar pretium nec a dui. Ut luctus elit eu nulla posuere nec feugiat ipsum vehicula. Quisque eu pulvinar neque. Fusce fermentum adipiscing mauris, sit amet accumsan ante dignissim ac. Pellentesque molestie mollis condimentum.
38
39 Etiam commodo nulla id risus convallis pharetra. Integer dapibus, eros vitae vehicula rhoncus, nisl lorem ornare magna, eu vehicula justo nunc ac nunc. In dolor sem, vulputate eget vulputate id, euismod eu ligula. Nullam elit augue, ultrices ut pretium vel, bibendum sit amet est. Curabitur vulputate arcu vitae neque adipiscing vel commodo ante faucibus. Cras tempor placerat erat. Sed ultrices faucibus sodales. Vestibulum sollicitudin consectetur mauris, nec mollis quam accumsan ultrices. Vestibulum tincidunt libero a lectus condimentum et fermentum diam eleifend. Nam accumsan interdum neque nec aliquet. Praesent feugiat dui at est rhoncus lacinia."
40 []
41 (println "Hello, World!"))
Something went wrong with that request. Please try again.