1 ;; Testing clisp interop
9 (cl-eval "(setq foo 1 bar 2 baz 3)")
11 (cl-eval "(list foo bar baz)")
18 ;; Testing boolean flag
19 (cl-eval "(= 123 123)" true)
22 (cl-eval "(= 123 456)")
25 (cl-eval "(= 123 456)" true)
30 (cl-eval "(last nil)" false true)
33 (cl-eval "nil" false true)
40 ;; Testing creation of Common Lisp Objects
44 ;;; Not testing with elements since order in hashtable cannot be guaranteed
45 (cl-eval "(make-hash-table)")
48 (cl-eval "(defun redundant-identity (x) x)"))
51 (cl-eval "(redundant-identity 2)"))
54 (cl-eval "(defun range (max &key (min 0) (step 1)) (loop for n from min below max by step collect n))")
57 (cl-eval "(range 10 :min 0 :step 1)")
58 ;=>(0 1 2 3 4 5 6 7 8 9)
60 (cl-eval "(mapcar #'1+ (range 10 :min 0 :step 1))")
61 ;=>(1 2 3 4 5 6 7 8 9 10)