diff options
Diffstat (limited to 'gdb/testsuite/gdb.python/python.exp')
-rw-r--r-- | gdb/testsuite/gdb.python/python.exp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/gdb/testsuite/gdb.python/python.exp b/gdb/testsuite/gdb.python/python.exp index 3df9347..0e77256 100644 --- a/gdb/testsuite/gdb.python/python.exp +++ b/gdb/testsuite/gdb.python/python.exp @@ -61,6 +61,22 @@ gdb_py_test_multiple "multi-line python command" \ "print (23)" "" \ "end" "23" +# Spawn interactive Python help from a multi-line command, thus, after +# a secondary prompt. + +with_test_prefix "python interactive help" { + set test "python; help(); end" + gdb_test_multiple "python\nhelp()\nend" $test { + -re "online help utility.*help> $" { + pass $test + + # The "quit" must be seen on the output. A buggy GDB + # would not display it. + gdb_test "quit" "^quit.*leaving help.*" "quit help" + } + } +} + gdb_py_test_multiple "show python command" \ "define zzq" "Type commands for definition of .* just \"end\"\\.*" \ "python" "" \ |