From f2ec857c66d47e23a8d7598f08601091a00eb9c3 Mon Sep 17 00:00:00 2001 From: Michiel Borkent Date: Wed, 28 Apr 2021 11:26:49 +0200 Subject: [PATCH] Add min-version tests --- test/babashka/main_test.clj | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/test/babashka/main_test.clj b/test/babashka/main_test.clj index 014b40ad..b4a8636f 100644 --- a/test/babashka/main_test.clj +++ b/test/babashka/main_test.clj @@ -48,6 +48,13 @@ (is (:babashka/version v)) (is (:feature/xml v)))) +(deftest version-test + (is (= [1 0 0] (main/parse-version "1.0.0-SNAPSHOT"))) + (is (main/satisfies-min-version? "0.1.0")) + (is (main/satisfies-min-version? "0.1.0-SNAPSHOT")) + (is (not (main/satisfies-min-version? "300.0.0"))) + (is (not (main/satisfies-min-version? "300.0.0-SNAPSHOT")))) + (deftest print-error-test (is (thrown-with-msg? Exception #"java.lang.NullPointerException" (bb nil "(subs nil 0 0)"))))