@@ -127,18 +127,18 @@ def test_writeMemory(self):
127127 )
128128 self .continue_to_next_stop ()
129129
130- # Get the 'not_a_ptr' writable variablle reference address.
130+ # Get the 'not_a_ptr' writable variable reference address.
131131 ptr_deref = self .dap_server .request_evaluate ("not_a_ptr" )["body" ]
132132 memref = ptr_deref ["memoryReference" ]
133133
134134 # Write the Base64-encoded string "Mg==", which decodes to binary 0x32
135- # which is decimal 50 and corresponds to the SCII character '2'.
135+ # which is decimal 50 and corresponds to the ASCII character '2'.
136136 mem_response = self .dap_server .request_writeMemory (memref , 0 , "Mg==" )
137137 self .assertEqual (mem_response ["success" ], True )
138138 self .assertEqual (mem_response ["body" ]["bytesWritten" ], 1 )
139139
140140 # Read back the modified memory and verify that the written data matches
141- # the expecte result.
141+ # the expected result.
142142 mem_response = self .dap_server .request_readMemory (memref , 0 , 1 )
143143 self .assertEqual (mem_response ["success" ], True )
144144 self .assertEqual (mem_response ["body" ]["data" ], "Mg==" )
@@ -157,3 +157,7 @@ def test_writeMemory(self):
157157 # Writing to non-writable region should return an appropriate error.
158158 mem_response = self .dap_server .request_writeMemory (memref , 0 , "Mg==" , False )
159159 self .assertEqual (mem_response ["success" ], False )
160+ self .assertRegex (
161+ mem_response ["message" ],
162+ r"Memory " + memref + " region is not writable" ,
163+ )
0 commit comments