diff --git a/compiler+runtime/test/bash/clojure.string/pass-test b/compiler+runtime/test/bash/clojure.string/pass-test new file mode 100755 index 000000000..641cf6f06 --- /dev/null +++ b/compiler+runtime/test/bash/clojure.string/pass-test @@ -0,0 +1,3 @@ +#!/usr/bin/env bash +set -xeuo pipefail +jank --module-path src run-main clojure-string.self-test | grep ':success' diff --git a/compiler+runtime/test/bash/clojure.string/src/clojure_string/self_test.jank b/compiler+runtime/test/bash/clojure.string/src/clojure_string/self_test.jank new file mode 100644 index 000000000..ce7f59746 --- /dev/null +++ b/compiler+runtime/test/bash/clojure.string/src/clojure_string/self_test.jank @@ -0,0 +1,10 @@ +(ns clojure-test.self-test + (:require [clojure.string :as str])) + +(defn -main [] + (assert (= "" (str/reverse ""))) + (assert (= "tset-a" (str/reverse "a-test" "a"))) + (assert (str/starts-with? "" "")) + (assert (str/starts-with? "a-test" "a")) + (assert (not (str/starts-with? "a-test" "b"))) + :success)