Skip to content

Commit

Permalink
Refactor indentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
ruedigergad committed Sep 12, 2016
1 parent c8cc49b commit 533a323
Showing 1 changed file with 22 additions and 28 deletions.
50 changes: 22 additions & 28 deletions test/cli4clj/test/cli.clj
Original file line number Diff line number Diff line change
Expand Up @@ -209,39 +209,33 @@


(deftest async-cmd-not-finished-test
(let [cli-opts {:cmds
{:async-foo
{:fn
(fn []
(println "Starting...")
(let [tmp-out *out*]
(doto
(Thread.
(fn []
(binding [*out* tmp-out]
(sleep 500)
(println "Finished."))))
(.start)))
"Started.")}}}
(let [cli-opts {:cmds {:async-foo {:fn (fn []
(println "Starting...")
(let [tmp-out *out*]
(doto
(Thread.
(fn []
(binding [*out* tmp-out]
(sleep 500)
(println "Finished."))))
(.start)))
"Started.")}}}
test-cmd-input ["async-foo"]
out-string (test-cli-stdout #(start-cli cli-opts) test-cmd-input)]
(is (= (expected-string ["Starting..." "\"Started.\""]) out-string))))

(deftest async-cmd-sleep-finished-test
(let [cli-opts {:cmds
{:async-foo
{:fn
(fn []
(println "Starting...")
(let [tmp-out *out*]
(doto
(Thread.
(fn []
(binding [*out* tmp-out]
(sleep 500)
(println "Finished."))))
(.start)))
"Started.")}}}
(let [cli-opts {:cmds {:async-foo {:fn (fn []
(println "Starting...")
(let [tmp-out *out*]
(doto
(Thread.
(fn []
(binding [*out* tmp-out]
(sleep 500)
(println "Finished."))))
(.start)))
"Started.")}}}
test-cmd-input ["async-foo" "_sleep 1000"]
out-string (test-cli-stdout #(start-cli cli-opts) test-cmd-input)]
(is (= (expected-string ["Starting..." "\"Started.\"" "Finished."]) out-string))))
Expand Down

0 comments on commit 533a323

Please sign in to comment.