From 7d3c0ca7cbcfd88510455af5fe2ee96cfc80405d Mon Sep 17 00:00:00 2001 From: Nathan Marz Date: Mon, 29 Jun 2015 18:16:33 -0400 Subject: [PATCH] add test for first/last on empty structures --- VERSION | 2 +- test/clj/com/rpl/specter/core_test.clj | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index d1d899f..b49b253 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -0.5.5 +0.5.6 diff --git a/test/clj/com/rpl/specter/core_test.clj b/test/clj/com/rpl/specter/core_test.clj index 610b4f3..96fea73 100644 --- a/test/clj/com/rpl/specter/core_test.clj +++ b/test/clj/com/rpl/specter/core_test.clj @@ -362,3 +362,10 @@ (transform k1 inc) (transform k2 inc))) )) + +(deftest empty-pos-transform + (is (empty? (select FIRST []))) + (is (empty? (select LAST []))) + (is (= [] (transform FIRST inc []))) + (is (= [] (transform LAST inc []))) + )