git.fiddlerwoaroof.com
Browse code

Add a test

Fernando Borretti authored on 30/01/2015 00:57:06
Showing 3 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,10 @@
1
+(defsystem cl-yaml-test
2
+  :author "Fernando Borretti <eudoxiahp@gmail.com>"
3
+  :license "MIT"
4
+  :depends-on (:cl-yaml
5
+               :fiveam)
6
+  :components ((:module "t"
7
+                :serial t
8
+                :components
9
+                ((:file "parser")
10
+                 (:file "cl-yaml")))))
0 11
new file mode 100644
... ...
@@ -0,0 +1,6 @@
1
+(in-package :cl-user)
2
+(defpackage cl-yaml-test
3
+  (:use :cl :fiveam))
4
+(in-package :cl-yaml-test)
5
+
6
+(run! 'cl-yaml-test.parser:parser)
0 7
new file mode 100644
... ...
@@ -0,0 +1,14 @@
1
+(in-package :cl-user)
2
+(defpackage cl-yaml-test.parser
3
+  (:use :cl :fiveam)
4
+  (:export :parser))
5
+(in-package :cl-yaml-test.parser)
6
+
7
+(def-suite parser
8
+  :description "YAML parser tests.")
9
+(in-suite parser)
10
+
11
+(test lists
12
+  (is
13
+   (equal (yaml.parser:parse "[a, b, c]")
14
+          (list :document (list "a" "b" "c")))))