summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--test/clojure/test_clojure/string.clj14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/clojure/test_clojure/string.clj b/test/clojure/test_clojure/string.clj
index d1996c7c..04f76410 100644
--- a/test/clojure/test_clojure/string.clj
+++ b/test/clojure/test_clojure/string.clj
@@ -59,3 +59,17 @@
(deftest t-lower-case
(is (= "foobar" (s/lower-case "FooBar"))))
+(deftest nil-handling
+ (are [f args] (thrown? NullPointerException (apply f args))
+ s/reverse [nil]
+ s/replace [nil #"foo" "bar"]
+ s/replace-first [nil #"foo" "bar"]
+ s/capitalize [nil]
+ s/upper-case [nil]
+ s/lower-case [nil]
+ s/split [nil #"-"]
+ s/split [nil #"-" 1]
+ s/trim [nil]
+ s/triml [nil]
+ s/trimr [nil]
+ s/trim-newline [nil]))