|  | 
|  | 1 | +;;; cider-eval-tests.el | 
|  | 2 | + | 
|  | 3 | +;; Copyright © 2012-2021 Arne Brasseur | 
|  | 4 | + | 
|  | 5 | +;; Author: Arne Brasseur | 
|  | 6 | + | 
|  | 7 | +;; This file is NOT part of GNU Emacs. | 
|  | 8 | + | 
|  | 9 | +;; This program is free software: you can redistribute it and/or | 
|  | 10 | +;; modify it under the terms of the GNU General Public License as | 
|  | 11 | +;; published by the Free Software Foundation, either version 3 of the | 
|  | 12 | +;; License, or (at your option) any later version. | 
|  | 13 | +;; | 
|  | 14 | +;; This program is distributed in the hope that it will be useful, but | 
|  | 15 | +;; WITHOUT ANY WARRANTY; without even the implied warranty of | 
|  | 16 | +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | 
|  | 17 | +;; General Public License for more details. | 
|  | 18 | +;; | 
|  | 19 | +;; You should have received a copy of the GNU General Public License | 
|  | 20 | +;; along with this program. If not, see `http://www.gnu.org/licenses/'. | 
|  | 21 | + | 
|  | 22 | +;;; Commentary: | 
|  | 23 | + | 
|  | 24 | +;; This file is part of CIDER | 
|  | 25 | + | 
|  | 26 | +;;; Code: | 
|  | 27 | + | 
|  | 28 | +(require 'buttercup) | 
|  | 29 | +(require 'cider-eval) | 
|  | 30 | + | 
|  | 31 | +(describe "cider-provide-file" | 
|  | 32 | + (it "returns an empty string when the file is not found" | 
|  | 33 | + (expect (cider-provide-file "abc.clj") :to-equal "")) | 
|  | 34 | + (it "base64 encodes without newlines" | 
|  | 35 | + (let ((cider-sideloader-dir "/tmp") | 
|  | 36 | + (default-directory "/tmp") | 
|  | 37 | + (filename (make-temp-file "abc.clj"))) | 
|  | 38 | + (with-temp-file filename | 
|  | 39 | + (dotimes (_ 60) (insert "x"))) | 
|  | 40 | + (expect (cider-provide-file filename) :not :to-match "\n")))) | 
|  | 41 | + | 
|  | 42 | +(provide 'cider-eval-tests) | 
0 commit comments