       (is (= {:server "localhost"}
              (cli '("-s" "localhost")
                   (optional ["-s" "--server"])))))
+
     (deftest should-use-last-alias-provided-as-name-in-map
       (is (= {:sizzle "localhost"}
              (cli '("-s" "localhost")

(ns clojure.tools.cli-test
  (:use [clojure.test]
        [clojure.tools.cli]))

(testing "help"
  (deftest should-print-help-shortform
    (let [help-called (atom nil)]
      (binding [help-and-quit (partial reset! help-called)]
        (cli '("-h") (optional ["--port"]))
        (is (not (nil? @help-called))))))

  (deftest should-print-help-longform
    (let [help-called (atom nil)]
      (binding [help-and-quit (partial reset! help-called)]
        (cli '("--help") (optional ["--port"]))
        (is (not (nil? @help-called)))))))

(testing "syntax"
  (deftest should-handle-simple-strings

  (testing "required"
    (deftest should-succeed-when-provided
      (cli '("--server" "localhost")
           (required ["--server"]))))

  (testing "grouped parameters"
    (deftest should-support-groups
