git.fiddlerwoaroof.com
Browse code

Add README examples, update tests

Fernando Borretti authored on 31/01/2015 16:19:22
Showing 2 changed files
... ...
@@ -31,6 +31,20 @@ values. The strategy can be customized by setting the value of
31 31
 
32 32
 # Usage
33 33
 
34
+## Examples
35
+
36
+```lisp
37
+CL-USER> (yaml:parse "[1, 2, 3]")
38
+(:DOCUMENT (1 2 3))
39
+CL-USER> (yaml:parse "{ a: 1, b: 2 }")
40
+(:DOCUMENT {"a" => 1, "b" => 2})
41
+CL-USER> (yaml:parse "- Mercury
42
+- Venus
43
+- Earth
44
+- Mars")
45
+(:DOCUMENT ("Mercury" "Venus" "Earth" "Mars"))
46
+```
47
+
34 48
 # License
35 49
 
36 50
 Copyright (c) 2013-2015 Fernando Borretti
... ...
@@ -10,5 +10,5 @@
10 10
 
11 11
 (test lists
12 12
   (is
13
-   (equal (yaml.parser:parse "[a, b, c]")
13
+   (equal (yaml.parser:parse-string "[a, b, c]")
14 14
           (list :document (list "a" "b" "c")))))