Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions project.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
(defproject clj-yaml "0.4.0"
(defproject clj-yaml "0.4.1"
:description "YAML encoding and decoding for Clojure using SnakeYAML"
:url "http://github.com/lancepantz/clj-yaml"
:dependencies
[[org.clojure/clojure "1.2.0"]
[org.yaml/snakeyaml "1.5"]])
[org.yaml/snakeyaml "1.11"]])
11 changes: 9 additions & 2 deletions test/clj_yaml/core_test.clj
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
(ns clj-yaml.core-test
(:use clojure.test)
(:use clj-yaml.core))
(:use clj-yaml.core)
(:import [java.util Date]))

(def nested-hash-yaml
"root:\n childa: a\n childb: \n grandchild: \n greatgrandchild: bar\n")
Expand Down Expand Up @@ -118,4 +119,10 @@ the-bin: !!binary 0101")
(is (= "- age: 33\n name: jon\n- age: 44\n name: boo\n"
(generate-string data :dumper-options {:flow-style :block})))
(is (= "[{age: 33, name: jon}, {age: 44, name: boo}]\n"
(generate-string data :dumper-options {:flow-style :flow})))))
(generate-string data :dumper-options {:flow-style :flow})))))

(deftest parse-time
(testing "clj-time parses timestamps with more than millisecond precision correctly."
(let [timestamp "2001-11-23 15:02:31.123456 -04:00"
expected 1006542151123]
(is (= (.getTime (parse-string timestamp)) expected)))))