Fix test names starting with uppercase using multi-line gdb_test_no_output
[binutils-gdb.git] / gdb / testsuite / gdb.base / testenv.exp
index ff337fe11c468e0d3a9dadceee24d7eb0ad7f099..9d03f9135ae0df4eecd4f074068c5468ed5d0a4f 100644 (file)
@@ -1,4 +1,4 @@
-# Copyright 2011-2012 Free Software Foundation, Inc.
+# Copyright 2011-2016 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
 # Check if environment variables are correctly passed to inferiors
 #
 
-if $tracelevel then {
-       strace $tracelevel
-}
-
 # There's no support for passing environment variables in the remote protocol.
 if { [is_remote target] } {
     return 0
 }
 
-set testfile "testenv"
-set srcfile ${testfile}.c
-set binfile ${testfile}
+standard_testfile .c
 
 # Compile binary
 # and start with a fresh gdb
@@ -40,7 +34,7 @@ if { [prepare_for_testing ${testfile}.exp ${binfile} ${srcfile}] } {
 
 # make sure $pc is sane, in case we're talking to a board.
 if { ![runto_main] } {
-    gdb_suppress_tests;
+    gdb_suppress_tests
 }
 
 set bp_line [gdb_get_line_number "set breakpoint here"]
@@ -55,10 +49,10 @@ gdb_breakpoint  $bp_line
 # First test with no TEST_GDB_VAR
 gdb_test "continue" \
   ".*Program found 0 variables starting with TEST_GDB.*" \
-  "Test no TEST_GDB var"
+  "test no TEST_GDB var"
 
 gdb_test_no_output "set env TEST_GDB_VAR1 test1" \
-  "Set TEST_GDB_VAR1"
+  "set TEST_GDB_VAR1"
 
 runto_main
 gdb_breakpoint  $bp_line
@@ -66,10 +60,10 @@ gdb_breakpoint  $bp_line
 # Second test with one TEST_GDB_VAR
 gdb_test "continue" \
   ".*Program found 1 variables starting with TEST_GDB.*" \
-  "Test with one TEST_GDB var"
+  "test with one TEST_GDB var"
 
 gdb_test_no_output "set env TEST_GDB_VAR2 test2" \
-  "Set TEST_GDB_VAR2"
+  "set TEST_GDB_VAR2"
 
 runto_main
 gdb_breakpoint  $bp_line
@@ -77,10 +71,10 @@ gdb_breakpoint  $bp_line
 # Third test with two TEST_GDB_VAR
 gdb_test "continue"  \
   ".*Program found 2 variables starting with TEST_GDB.*" \
-  "Test with two TEST_GDB var"
+  "test with two TEST_GDB var"
 
 gdb_test_no_output "unset env TEST_GDB_VAR1" \
-  "Unset TEST_GDB_VAR1"
+  "unset TEST_GDB_VAR1"
 
 runto_main
 gdb_breakpoint  $bp_line
@@ -89,7 +83,7 @@ gdb_breakpoint  $bp_line
 # with unset command.
 gdb_test "continue"  \
   ".*Program found 1 variables starting with TEST_GDB.*" \
-  "Test with one TEST_GDB var, after unset"
+  "test with one TEST_GDB var, after unset"
 
 gdb_exit
 
@@ -99,20 +93,20 @@ clean_restart $binfile
 
 # make sure $pc is sane, in case we're talking to a board.
 if { ![runto_main] } {
-    gdb_suppress_tests;
+    gdb_suppress_tests
 }
 
 set bp_line [gdb_get_line_number "set breakpoint here"]
 gdb_breakpoint  $bp_line
 
-gdb_test "show env" ".*TEST_GDB_GLOBAL=.*" "Test passing TEST_GDB_GLOBAL to GDB"
+gdb_test "show env" ".*TEST_GDB_GLOBAL=.*" "test passing TEST_GDB_GLOBAL to GDB"
 # First test with only inherited TEST_GDB_GLOBAL
 gdb_test "continue" \
   ".*TEST_GDB_GLOBAL=Global environment value.*Program found 1 variables starting with TEST_GDB.*" \
-  "Test with TEST_GDB_GLOBAL"
+  "test with TEST_GDB_GLOBAL"
 
 gdb_test_no_output "unset env TEST_GDB_GLOBAL" \
-  "Unset TEST_GDB_GLOBAL"
+  "unset TEST_GDB_GLOBAL"
 
 runto_main
 gdb_breakpoint  $bp_line
@@ -120,7 +114,7 @@ gdb_breakpoint  $bp_line
 # Second test with one TEST_GDB_VAR
 gdb_test "continue" \
   ".*Program found 0 variables starting with TEST_GDB.*" \
-  "Test with TEST_GDB_GLOBAL unset"
+  "test with TEST_GDB_GLOBAL unset"
 
 gdb_exit