1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-11 13:55:55 +03:00

Add seq and string? tests.

Issue #166
This commit is contained in:
Joel Martin 2016-02-11 09:17:49 -06:00
parent 044eb1c758
commit 329b6db3cf

View File

@ -101,6 +101,24 @@
;; ------- (Not needed for self-hosting) -------
;>>> soft=True
;;
;; Testing string? function
(string? "")
;=>true
(string? 'abc)
;=>false
(string? "abc")
;=>true
(string? :abc)
;=>false
(string? (keyword "abc"))
;=>false
(string? 234)
;=>false
(string? nil)
;=>false
;;
;; Testing conj function
(conj (list) 1)
@ -125,6 +143,25 @@
(conj [1] [2 3])
;=>[1 [2 3]]
;;
;; Testing seq function
(seq "abc")
;=>("a" "b" "c")
(apply str (seq "this is a test"))
;=>"this is a test"
(seq '(2 3 4))
;=>(2 3 4)
(seq [2 3 4])
;=>(2 3 4)
(seq "")
;=>nil
(seq '())
;=>nil
(seq [])
;=>nil
(seq nil)
;=>nil
;;
;; Testing metadata on collections