diff options
Diffstat (limited to 'gdb/testsuite/gdb.python/py-warning.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/py-warning.exp | 23 |
1 files changed, 20 insertions, 3 deletions
diff --git a/gdb/testsuite/gdb.python/py-warning.exp b/gdb/testsuite/gdb.python/py-warning.exp index b0256fa..6b26a4e 100644 --- a/gdb/testsuite/gdb.python/py-warning.exp +++ b/gdb/testsuite/gdb.python/py-warning.exp @@ -40,7 +40,24 @@ gdb_test "python gdb.warning(\"\")" \ "Error occurred in Python: Empty text string passed to gdb\\.warning"] # Missing argument gives an error. -gdb_test "python gdb.warning()" \ +set re1 \ [multi_line \ - "Python Exception <class 'TypeError'>: function missing required argument 'text' \\(pos 1\\)" \ - "Error occurred in Python: function missing required argument 'text' \\(pos 1\\)"] + [string_to_regexp \ + [concat \ + "Python Exception <class 'TypeError'>:" \ + "function missing required argument 'text' (pos 1)"]] \ + [string_to_regexp \ + [concat \ + "Error occurred in Python:" \ + "function missing required argument 'text' (pos 1)"]]] +set re2 \ + [multi_line \ + [string_to_regexp \ + [concat \ + "Python Exception <class 'TypeError'>:" \ + "Required argument 'text' (pos 1) not found"]] \ + [string_to_regexp \ + [concat \ + "Error occurred in Python:" \ + "Required argument 'text' (pos 1) not found"]]] +gdb_test "python gdb.warning()" $re1|$re2 |