tests/GDBMIParserTests.st
changeset 53 63669c2c0f9e
parent 47 4f5d75acecb0
child 67 c4ac76afe03d
--- a/tests/GDBMIParserTests.st	Wed Oct 01 09:38:44 2014 +0100
+++ b/tests/GDBMIParserTests.st	Fri Feb 27 12:48:56 2015 +0100
@@ -1,5 +1,7 @@
 "{ Package: 'jv:libgdbs/tests' }"
 
+"{ NameSpace: Smalltalk }"
+
 TestCase subclass:#GDBMIParserTests
 	instanceVariableNames:'properties prop1 prop2 prop3'
 	classVariableNames:''
@@ -151,21 +153,27 @@
 !
 
 test_simple_example_02
-    | parser  events |
+    | input parser events |
 
-    parser := GDBMIParser on:'1234*running
+
+    input := '1234*running
 1234^done
 (gdb)
-'.
+' readStream.
+    parser := GDBMIParser on: input.
     events := parser parseOutput.
-    self assert:events size == 2.
+    self assert:events size == 1.
     self assert:events first token == 1234.
-    self assert:events second isCommandResultEvent.
-    self assert:events second result status == CommandStatusDone.
-    self assert:events second token == 1234
+
+    parser := GDBMIParser on: input.
+    events := parser parseOutput.  
+    self assert:events size == 1.
+    self assert:events first isCommandResultEvent.
+    self assert:events first result status == CommandStatusDone.
+    self assert:events first token == 1234
 
     "Created: / 03-06-2014 / 00:50:55 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 09-06-2014 / 21:25:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 27-02-2015 / 09:24:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 test_simple_session_01