   (prop/for-all [s (gen/not-empty gen/string)]
     (is (not (re-matches #"[^A-Za-z0-9_.~-]+" (str/slug s))))))
 
-(deftest slug-test
-  (are [expected actual] (= expected actual)
-    "this-that-the-other-various-outre-considerations"
-    (str/slug "This, That & the Other! Various Outré   Considerations")))
+(defexamples slug-test
+  (str/slug "This, That & the Other! Various Outré   Considerations")
+  "this-that-the-other-various-outre-considerations")
 
 (defspec mixed-case-is-true-for-mixed-case-strings 100
   (prop/for-all [s1 (gen/not-empty gen/string)

    (.startsWith (str/common-prefix (str prefix s1) (str prefix s2)) prefix)))


(deftest common-suffix
  (are [expected actual] (= expected actual)
    "" (str/common-suffix "321" "123")
    "Åffø" (str/common-suffix "123456Åffø" "o8yuidfgÅffø")
    "123" (str/common-suffix "456123" "o8yuidfg123")
    "" (str/common-suffix "åberG" "åberg")
    "åberG" (str/common-suffix "åberg" "åberG" :ignore-case)
    "åberg" (str/common-suffix "Åberg" "åberg" :ignore-case)))

(defspec common-suffix-finds-common-suffixes 100
  (prop/for-all [suffix (gen/not-empty gen/string)

                              (gen/such-that #(> % (.length s)) gen/pos-int 100))))]
    (= (.length (str/center s width)) width)))

(defexamples chop-suffix
  (str/chop-suffix "" "foo") ""
  (str/chop-suffix "foo" "foo") ""
  (str/chop-suffix "foobar" "bar") "foo"
  (str/chop-suffix "foo " " ") "foo"
  (str/chop-suffix "foo" "bar") "foo"
  (str/chop-suffix "foo" "FOO") "foo"
  (str/chop-suffix "foo" "O") "foo"
  (str/chop-suffix "fooÅ" "å") "fooÅ"
  (str/chop-suffix "foo" "FOO" :ignore-case) ""
  (str/chop-suffix "foo" "O" :ignore-case) "fo"
  (str/chop-suffix "fooÅ" "å" :ignore-case) "foo")

(defexamples chop-prefix
  (str/chop-prefix "" "foo") ""
  (str/chop-prefix "foo" "foo") ""
  (str/chop-prefix "foobar" "foo")   "bar"
  (str/chop-prefix " foo" " ") "foo"
  (str/chop-prefix "foo" "bar") "foo"
  (str/chop-prefix "foo" "FOO") "foo"
  (str/chop-prefix "foo" "F") "foo"
  (str/chop-prefix "Åfoo" "å") "Åfoo"
  (str/chop-prefix "foo" "FOO" :ignore-case) ""
  (str/chop-prefix "foo" "F" :ignore-case) "oo"
  (str/chop-prefix "Åfoo" "Å" :ignore-case) "foo")

(defexamples contains-test?
  (str/contains? "" "") ""
  (str/contains? "1" "1") "1"
  (str/contains? "foo" "fo") "foo"
  (str/contains? "foobar" "qux") nil
  (str/contains? "foobar" "BAR") nil
  (str/contains? "foobar" "BAR" :ignore-case) "foobar"
  (str/contains? "Albert Åberg" "åberg" :ignore-case) "Albert Åberg")

(defspec contains?-finds-generated-strings 100
  (prop/for-all [before gen/string
