gdb/python: don't allow the user to delete window title attributes
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / arrayidx.exp
index d8ee5c0e9af083b728da9745400b4fa11800e014..af792ed0cac4eeb927659a20fed3dc504257659e 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2005, 2007, 2008, 2009, 2010, 2011 Free Software Foundation, Inc.
+# Copyright 2005-2021 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
 # gdb can correctly print arrays with indexes for each element of the
 # array.
 
-if $tracelevel {
-    strace $tracelevel
-}
+standard_testfile .c
 
-set testfile "arrayidx"
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
 if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug}] != "" } {
-    untested "Couldn't compile ${srcfile}"
+    untested "failed to compile"
     return -1
 }
 
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
+clean_restart ${binfile}
 
 if ![runto_main] then {
     perror "couldn't run to breakpoint"
@@ -42,19 +34,19 @@ if ![runto_main] then {
 # First, print the array without the indexes
 
 gdb_test_no_output "set print array-indexes off" \
-         "Set print array-indexes to off"
+         "set print array-indexes to off"
 
 gdb_test "print array" \
          "\\{1, 2, 3, 4\\}" \
-         "Print array with array-indexes off"
+         "print array with array-indexes off"
 
 # Second, print the same array with the indexes
 
 gdb_test_no_output "set print array-indexes on" \
-         "Set print array-indexes to on"
+         "set print array-indexes to on"
 
 gdb_test "print array" \
          "\\{\\\[0\\\] = 1, \\\[1\\\] = 2, \\\[2\\\] = 3, \\\[3\\\] = 4\\}" \
-         "Print array with array-indexes on"
+         "print array with array-indexes on"
 
 
This page took 0.025086 seconds and 4 git commands to generate.