]> gitweb.factorcode.org Git - factor.git/commitdiff
infix: add a test for nested local scopes.
authorJohn Benediktsson <mrjbq7@gmail.com>
Thu, 16 Mar 2017 22:49:07 +0000 (15:49 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Thu, 16 Mar 2017 22:49:07 +0000 (15:49 -0700)
extra/infix/infix-tests.factor

index bf92986d8f6a39cc5a694e67ce6d50810265b0de..10440b67264f17616d56b663d834021c1b9e6c79 100644 (file)
@@ -1,7 +1,7 @@
 ! Copyright (C) 2009 Philipp Brüschweiler
 ! See http://factorcode.org/license.txt for BSD license.
 USING: infix infix.private kernel locals math math.functions
-tools.test ;
+sequences tools.test ;
 IN: infix.tests
 
 { 0 } [ [infix 0 infix] ] unit-test
@@ -54,3 +54,11 @@ IN: infix.tests
 INFIX:: foo ( x y -- z ) x**2-abs(y) ;
 
 { 194 } [ 15 31 foo ] unit-test
+
+{ "foobar" } [
+    [let "foo" :> s
+        [let "bar" :> t
+            [infix append(s, t) infix]
+        ]
+    ]
+] unit-test