]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/multiline/multiline-tests.factor
parse-here doesn't consume an extra line now, and it checks that once a line has...
[factor.git] / basis / multiline / multiline-tests.factor
index ad624dd917d1b138c6184d2b5017054b2a3f3807..3a4e3dd62ee6039a0fa4d172b6db5979ff8932f5 100644 (file)
@@ -1,4 +1,4 @@
-USING: accessors eval multiline tools.test ;
+USING: accessors eval multiline sequences tools.test ;
 IN: multiline.tests
 
 STRING: test-it
@@ -78,3 +78,24 @@ lolaol ] unit-test
 [ "whoa" ]
 [ DELIMITED: factor blows my mind
 whoafactor blows my mind ] unit-test
+
+<<
+SYNTAX: MULTILINE-LITERAL: parse-here suffix! ;
+>>
+
+[ { "bar" } ]
+[
+    CONSTANT: foo { MULTILINE-LITERAL:
+bar
+;
+} foo
+] unit-test
+
+
+! Make sure parse-here fails if extra crap appears on the first line
+[
+    "CONSTANT: foo { MULTILINE-LITERAL: asdfasfdasdfas
+bar
+;
+}" eval
+] must-fail