tests/GDBMIParserTests.st
changeset 84 7913863edaa6
parent 79 303c4edc75ad
child 87 50e80d25ea6f
--- a/tests/GDBMIParserTests.st	Tue Jun 13 17:06:02 2017 +0100
+++ b/tests/GDBMIParserTests.st	Thu Jul 06 07:54:57 2017 +0200
@@ -117,6 +117,20 @@
     "Created: / 20-06-2014 / 09:08:35 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
+test_command_break_modified_01
+    | parser  events |
+
+    parser := GDBMIParser 
+            on:'=breakpoint-modified,bkpt={number="1",type="breakpoint",disp="keep",enabled="y",addr="0xf33f4daf",func="_mark",file="new.c",fullname="/home/jv/Private/Projects/SmalltalkX/sources/stx_8_0_0_x32_lin/build/stx/librun/new.c",line="18538",thread-groups=["i1"],times="0",script={"set $x = $x + 1","c"},original-location="_mark"}
+'.
+    events := parser parseOutput.
+    self assert:events size == 1.
+    self assert:events first class == GDBBreakpointModifiedEvent.
+    self assert:(events first breakpoint propertyAt:'script') = #('set $x = $x + 1', 'c')
+
+    "Created: / 06-07-2017 / 07:47:05 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
 test_command_gdb_exit
     | parser events result |
 
@@ -429,6 +443,24 @@
     self assert:((tuple at:'p1') at:'y') = '10'.
 
     "Created: / 18-06-2014 / 07:12:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_tuple_03a
+    | tuple |
+
+    tuple := (GDBMIParser on:'{"c"}') parseTuple.
+    self assert:tuple = #('c').
+
+    "Created: / 06-07-2017 / 07:45:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+!
+
+test_tuple_03b
+    | tuple |
+
+    tuple := (GDBMIParser on:'{"line1","line2"}') parseTuple.
+    self assert:tuple = #('line1' 'line2').
+
+    "Created: / 06-07-2017 / 08:21:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !GDBMIParserTests methodsFor:'tests - values - typed'!