|
31 | 31 | ;; Please, for each `describe', ensure there's an `it' block, so that its execution is visible in CI.
|
32 | 32 |
|
33 | 33 | (describe "cider-provide-file"
|
34 |
| - (it "returns an empty string when the file is not found" |
35 |
| - (expect (cider-provide-file "abc.clj") :to-equal "")) |
36 |
| - (it "base64 encodes without newlines" |
37 |
| - (let ((cider-sideloader-path (list "/tmp")) |
38 |
| - (default-directory "/tmp") |
39 |
| - (filename (make-temp-file "abc.clj"))) |
40 |
| - (with-temp-file filename |
41 |
| - (dotimes (_ 60) (insert "x"))) |
42 |
| - (expect (cider-provide-file filename) :not :to-match "\n"))) |
43 |
| - (it "can handle multibyte characters" |
44 |
| - (let ((cider-sideloader-path (list "/tmp")) |
45 |
| - (default-directory "/tmp") |
46 |
| - (filename (make-temp-file "abc.clj")) |
47 |
| - (coding-system-for-write 'utf-8-unix)) |
48 |
| - (with-temp-file filename |
49 |
| - (insert "🍻")) |
50 |
| - (expect (cider-provide-file filename) :to-equal "8J+Nuw==")))) |
| 34 | + (let ((tmp-dir (temporary-file-directory))) |
| 35 | + (it "returns an empty string when the file is not found" |
| 36 | + (expect (cider-provide-file "abc.clj") :to-equal "")) |
| 37 | + (it "base64 encodes without newlines" |
| 38 | + (let ((cider-sideloader-path (list tmp-dir)) |
| 39 | + (default-directory tmp-dir) |
| 40 | + (filename (make-temp-file "abc.clj"))) |
| 41 | + (with-temp-file filename |
| 42 | + (dotimes (_ 60) (insert "x"))) |
| 43 | + (expect (cider-provide-file filename) :not :to-match "\n"))) |
| 44 | + (it "can handle multibyte characters" |
| 45 | + (let ((cider-sideloader-path (list tmp-dir)) |
| 46 | + (default-directory tmp-dir) |
| 47 | + (filename (make-temp-file "abc.clj")) |
| 48 | + (coding-system-for-write 'utf-8-unix)) |
| 49 | + (with-temp-file filename |
| 50 | + (insert "🍻")) |
| 51 | + (expect (cider-provide-file filename) :to-equal "8J+Nuw=="))))) |
51 | 52 |
|
52 | 53 | (describe "cider-extract-error-info"
|
53 | 54 | (it "Matches Clojure compilation exceptions"
|
|
0 commit comments