]> gitweb.factorcode.org Git - factor.git/commitdiff
Fixing long-standing bug in wrap
authorDaniel Ehrenberg <littledan@Macintosh-122.local>
Fri, 3 Jul 2009 01:24:41 +0000 (20:24 -0500)
committerDaniel Ehrenberg <littledan@Macintosh-122.local>
Fri, 3 Jul 2009 01:24:41 +0000 (20:24 -0500)
basis/wrap/wrap-tests.factor [new file with mode: 0644]
basis/wrap/wrap.factor

diff --git a/basis/wrap/wrap-tests.factor b/basis/wrap/wrap-tests.factor
new file mode 100644 (file)
index 0000000..e597b95
--- /dev/null
@@ -0,0 +1,5 @@
+! Copyright (C) 2009 Daniel Ehrenberg
+! See http://factorcode.org/license.txt for BSD license.
+USING: wrap tools.test ;
+
+[ { } ] [ { } 10 10 wrap ] unit-test
index c648f6bd61bdef0408bac6b111a48d3e2c9b2cf0..b28b0bcbff98e84648ed609cf476ec91ce9cddde 100644 (file)
@@ -77,8 +77,10 @@ SYMBOL: line-ideal
     [
         line-ideal set
         line-max set
-        initialize
-        [ wrap-step ] reduce
-        min-cost
-        post-process
+        [ { } ] [
+            initialize
+            [ wrap-step ] reduce
+            min-cost
+            post-process
+        ] if-empty
     ] with-scope ;