Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(406)

Unified Diff: gdb/testsuite/gdb.python/py-prompt.exp

Issue 124383005: GDB 7.6.50 (Closed) Base URL: http://git.chromium.org/native_client/nacl-gdb.git@upstream
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gdb/testsuite/gdb.python/py-prompt.c ('k') | gdb/testsuite/gdb.python/py-section-script.c » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gdb/testsuite/gdb.python/py-prompt.exp
diff --git a/gdb/testsuite/gdb.python/py-prompt.exp b/gdb/testsuite/gdb.python/py-prompt.exp
index b5d9368d0d5dc0aa46f4801f2397ea4d52582ddb..a2660633133072b81527ed01598cf1ed8f1d730e 100644
--- a/gdb/testsuite/gdb.python/py-prompt.exp
+++ b/gdb/testsuite/gdb.python/py-prompt.exp
@@ -1,4 +1,4 @@
-# Copyright (C) 2011-2012 Free Software Foundation, Inc.
+# Copyright (C) 2011-2013 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -59,24 +59,24 @@ set gdb_prompt "\[(\]Foo\[)\]"
set GDBFLAGS [concat $tmp_gdbflags " -ex \"set editing on\""]
prompt_gdb_start
-gdb_test "python x = len(p); print gdb.execute(\"show prompt\", to_string = True)" \
+gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
".*prompt is \"$gdb_prompt \".*" \
"show prompt gets the correct result"
-gdb_test "python print x, len(p)" "1 2" \
+gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
"retrieving the prompt causes no extra prompt_hook calls"
-gdb_test "python print \"'\" + str(p\[0\]) + \"'\"" "'$gdb_prompt_fail '" \
+gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
"prompt_hook argument is default prompt."
gdb_exit
set GDBFLAGS [concat $tmp_gdbflags " -ex \"set editing off\""]
prompt_gdb_start
-gdb_test "python x = len(p); print gdb.execute(\"show prompt\", to_string = True)" \
+gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
".*prompt is \"$gdb_prompt \".*" \
"show prompt gets the correct result 2"
-gdb_test "python print x, len(p)" "1 2" \
+gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
"retrieving the prompt causes no extra prompt_hook calls 2"
-gdb_test "python print \"'\" + str(p\[0\]) + \"'\"" "'$gdb_prompt_fail '" \
+gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
"prompt_hook argument is default prompt. 2"
gdb_exit
@@ -98,12 +98,12 @@ set GDBFLAGS [concat $GDBFLAGS " -ex \"continue&\""]
# sync_execution = 1 is_running = 1
prompt_gdb_start
-gdb_test "python x = len(p); print gdb.execute(\"show prompt\", to_string = True)" \
+gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
".*prompt is \"$gdb_prompt \".*" \
"show prompt gets the correct result 3"
-gdb_test "python print x, len(p)" "1 2" \
+gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
"retrieving the prompt causes no extra prompt_hook calls 3"
-gdb_test "python print \"'\" + str(p\[0\]) + \"'\"" "'$gdb_prompt_fail '" \
+gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
"prompt_hook argument is default prompt. 3"
gdb_exit
@@ -115,14 +115,15 @@ set GDBFLAGS [concat $GDBFLAGS " -ex \"interrupt\""]
# sync_execution = 1 is_running = 0
prompt_gdb_start
-gdb_test "python x = len(p); print gdb.execute(\"show prompt\", to_string = True)" \
+gdb_test "python x = len(p); print (gdb.execute(\"show prompt\", to_string = True))" \
".*prompt is \"$gdb_prompt \".*" \
"show prompt gets the correct result 4"
-gdb_test "python print x, len(p)" "1 2" \
+gdb_test "python print ('%d %d' % (x, len(p)))" "1 2" \
"retrieving the prompt causes no extra prompt_hook calls 4"
-gdb_test "python print \"'\" + str(p\[0\]) + \"'\"" "'$gdb_prompt_fail '" \
+gdb_test "python print (\"'\" + str(p\[0\]) + \"'\")" "'$gdb_prompt_fail '" \
"prompt_hook argument is default prompt. 4"
gdb_exit
set GDBFLAGS $saved_gdbflags
+exec kill -9 ${testpid}
return 0
« no previous file with comments | « gdb/testsuite/gdb.python/py-prompt.c ('k') | gdb/testsuite/gdb.python/py-section-script.c » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698