|
111 | 111 | (expect (ict-bounds-string (inf-clojure-completion-bounds-of-expr-at-point)) |
112 | 112 | :to-equal "deref"))))) |
113 | 113 |
|
114 | | -(describe "inf-clojure--make-single-line" |
115 | | - (it "replaces newlines with whitespace" |
116 | | - (expect (inf-clojure--make-single-line "(do\n(println \"hello world\")\n)") :to-equal "(do (println \"hello world\") )")) |
117 | | - |
118 | | - (it "does not leave whitespace at the end" |
119 | | - (expect (inf-clojure--make-single-line "(do\n(println \"hello world\")\n)\n\n") :to-equal "(do (println \"hello world\") )")) |
120 | | - |
121 | | - (it "returns empty string when the line is only newlines" |
122 | | - (expect (inf-clojure--make-single-line "\n\n\n\n") :to-equal "")) |
123 | | - |
124 | | - (it "removes comments when on their own line" |
125 | | - (expect (inf-clojure--make-single-line "(do\n(println \"hello world\")\n ;; remove me\n)") :to-equal "(do (println \"hello world\") )")) |
126 | | - |
127 | | - (it "preserves newlines of inline comments" |
128 | | - (expect (inf-clojure--make-single-line "(do\n(println \"hello world\") ;; don't remove this\n)") :to-equal "(do (println \"hello world\") ;; don't remove this\n )")) |
129 | | - |
130 | | - ) |
131 | | - |
132 | 114 | (describe "inf-clojure--sanitize-command" |
133 | 115 | (it "sanitizes the command correctly" |
134 | 116 | (expect (inf-clojure--sanitize-command "(doc println)") :to-equal "(doc println)\n")) |
|
137 | 119 | (expect (inf-clojure--sanitize-command "(doc println)\n\n\n\n") :to-equal "(doc println)\n")) |
138 | 120 |
|
139 | 121 | (it "returns empty string when the command is empty" |
140 | | - (expect (inf-clojure--sanitize-command " ") :to-equal ""))) |
| 122 | + (expect (inf-clojure--sanitize-command " ") :to-equal "")) |
| 123 | + |
| 124 | + (it "only removes whitespace at the end of the command - fix 152" |
| 125 | + (expect (inf-clojure--sanitize-command "1 5") :to-equal "1 5\n"))) |
141 | 126 |
|
142 | 127 | (describe "inf-clojure--update-feature" |
143 | 128 | (it "updates new forms correctly" |
|
0 commit comments