aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base/list.exp
diff options
context:
space:
mode:
authorAndrew Burgess <aburgess@redhat.com>2022-11-14 11:31:04 +0000
committerAndrew Burgess <aburgess@redhat.com>2022-11-28 21:04:09 +0000
commit65a33d75c2667895f067cc5f9079215126cbb2eb (patch)
treefdd3f74defa60f3a0cb96123071d49990fd9cfe0 /gdb/testsuite/gdb.base/list.exp
parented7fbdd033a272ff0d7d82c2153d7d0fade80d26 (diff)
downloadgdb-65a33d75c2667895f067cc5f9079215126cbb2eb.zip
gdb-65a33d75c2667895f067cc5f9079215126cbb2eb.tar.gz
gdb-65a33d75c2667895f067cc5f9079215126cbb2eb.tar.bz2
gdb/testsuite: remove use of then keyword from gdb.base/*.exp
The canonical form of 'if' in modern TCL is 'if {} {}'. But there's still a bunch of places in the testsuite where we make use of the 'then' keyword, and sometimes these get copies into new tests, which just spreads poor practice. This commit removes all use of the 'then' keyword from the gdb.base/ test script directory. There should be no changes in what is tested after this commit.
Diffstat (limited to 'gdb/testsuite/gdb.base/list.exp')
-rw-r--r--gdb/testsuite/gdb.base/list.exp8
1 files changed, 4 insertions, 4 deletions
diff --git a/gdb/testsuite/gdb.base/list.exp b/gdb/testsuite/gdb.base/list.exp
index fe894a0..9cd1daa 100644
--- a/gdb/testsuite/gdb.base/list.exp
+++ b/gdb/testsuite/gdb.base/list.exp
@@ -98,7 +98,7 @@ proc test_listsize {} {
# Try small listsize > 2 that is an even number.
- if [ set_listsize 4 ] then {
+ if {[set_listsize 4]} {
gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 1 with listsize 4"
gdb_test "list 2" "1\[ \t\]+#include \"list0.h\".*4\[ \t\]+\{" "list line 2 with listsize 4"
@@ -108,7 +108,7 @@ proc test_listsize {} {
# Try a size larger than the entire file.
- if [ set_listsize 100 ] then {
+ if {[set_listsize 100]} {
gdb_test "list 1" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 1 with listsize 100"
gdb_test "list 10" "1\[ \t\]+#include \"list0.h\".*\r\n${last_line_re}" "list line 10 with listsize 100"
@@ -411,7 +411,7 @@ gdb_test_no_output "set width 0"
test_listsize
get_debug_format
-if [ set_listsize 10 ] then {
+if {[set_listsize 10]} {
test_list_include_file
test_list_filename_and_number
test_list_function
@@ -466,7 +466,7 @@ proc test_list {command listsize1 listsize2 linerange1 linerange2} {
global binfile
clean_restart $binfile
- if ![runto_main] then {
+ if {![runto_main]} {
return
}