compiler/tests/PPCCodeGeneratorTest.st
changeset 506 e5d63143737f
parent 504 0fb1f0799fc1
child 516 3b81c9e53352
--- a/compiler/tests/PPCCodeGeneratorTest.st	Mon Jul 27 10:21:41 2015 +0100
+++ b/compiler/tests/PPCCodeGeneratorTest.st	Mon Jul 27 16:28:48 2015 +0100
@@ -143,6 +143,20 @@
     "Created: / 16-06-2015 / 07:22:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+testActionNode7
+    node := ((#letter asParser , #letter asParser) 
+            ==> [:nodes | self createStringFromCharacters: nodes ]) asCompilerTree.
+    node child markForInline.
+
+    self compileTree:node.
+
+    self assert:parser parse:'ab' to:'ab'.
+    self assert:parser parse:'cz' to:'cz'.
+    self assert:parser fail:''.
+
+    "Created: / 27-07-2015 / 15:48:14 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 testAnyNode
     node := PPCForwardNode new
         child: PPCAnyNode new;
@@ -1109,6 +1123,14 @@
     self assert: parser parse: '' to: nil.
 ! !
 
+!PPCCodeGeneratorTest methodsFor:'utilities'!
+
+createStringFromCharacters: characters
+    ^ String withAll: characters
+
+    "Created: / 27-07-2015 / 15:47:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !PPCCodeGeneratorTest class methodsFor:'documentation'!
 
 version_HG