2013-04-24 Muhammad Bilal <mbilal@codesourcery.com>
[deliverable/binutils-gdb.git] / gdb / testsuite / gdb.base / setshow.exp
index b2183143120b791603be5a7f62c95e3978b680f6..c78d2df1d0191e142fadf0e1b2cbb3b3fde244c0 100644 (file)
@@ -1,5 +1,4 @@
-# Copyright 1992, 1994, 1996-1998, 2001, 2003, 2007-2012 Free Software
-# Foundation, Inc.
+# Copyright 1992-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
@@ -87,6 +86,10 @@ gdb_test_no_output "set annotate 0" "set annotate 0"
 gdb_test "show annotate" "Annotation_level is 0..*"  "show annotate (0)" 
 #test annotation_level 0
 gdb_test "info line 1" "Line 1 of .* is at address .* but contains no code.*"  "annotation_level 0" 
+
+gdb_test_no_output "set args ~"
+gdb_test "show args" "Argument list to give program being debugged when it is started is \"~\"..*" \
+    "show args ~"
 #test set args
 gdb_test_no_output "set args foo bar blup baz bubble" "set args" 
 #test show args
@@ -110,19 +113,22 @@ gdb_test "show check range" "Range checking is \"off\"\..*" "show check range (o
 #test set check range auto
 gdb_test_no_output "set check range auto" "set check range auto" 
 #test show check range auto
-gdb_test "show check range" "Range checking is \"auto; currently .*" "show check range (auto)" 
-#test set check type on
-gdb_test "set check type on" ".*" "set check type on" 
-#test show check type on
-gdb_test "show check type" "Type checking is \"on\"..*" "show check type (on)" 
-#test set check type off with trailing space
-gdb_test_no_output "set check type off " "set check type off" 
-#test show check type off
-gdb_test "show check type" "Type checking is \"off\"..*" "show check type (off)" 
-#test set check type auto
-gdb_test_no_output "set check type auto" "set check type auto" 
-#test show check type
-gdb_test "show check type" "Type checking is \"auto; currently .*" "show check type (auto)" 
+gdb_test "show check range" "Range checking is \"auto; currently .*" "show check range (auto)"
+
+# Test set check type on
+gdb_test "set check type on" ".*" "set check type on"
+
+# Test show check type on
+gdb_test "show check type" "Strict type checking is on\..*" \
+    "show check type (on)"
+
+# Test set check type off with trailing space
+gdb_test_no_output "set check type off " "set check type off"
+
+# Test show check type off
+gdb_test "show check type" "Strict type checking is off\..*" \
+    "show check type (off)"
+
 #test set complaints 100
 gdb_test_no_output "set complaints 100" "set complaints 100" 
 #test show complaints 100
@@ -156,8 +162,9 @@ gdb_test "show environment FOOBARBAZ" "FOOBARBAZ = grbxgrbxgrbx.*"  "show enviro
 gdb_test_no_output "set height 100" "set height 100" 
 #test show height 100
 gdb_test "show height" "Number of lines gdb thinks are in a page is 100..*" "show height" 
-# back to infinite height to avoid pagers
-gdb_test_no_output "set height 0" ""
+# Back to infinite height to avoid pagers.  While at it, check that
+# literal "unlimited" works just as well as 0.
+gdb_test_no_output "set height unlimited"
 #test set history expansion on
 gdb_test_no_output "set history expansion on" "set history expansion on" 
 #test show history expansion on
@@ -252,3 +259,10 @@ gdb_test "show verbose" "Verbose printing of informational messages is on..*" "s
 gdb_test_no_output "set verbose off" "set verbose off" 
 #test show verbose off
 gdb_test "show verbose" "Verbosity is off..*" "show verbose (off)" 
+#test argument must be preceded by space
+foreach x {"history file" "solib-search-path" "data-directory"} {
+    foreach y {"/home/" "." "~/home" "=home"} {
+        gdb_test "set $x$y" "Argument must be preceded by space." \
+            "$x is not set to $y"
+    }
+}
This page took 0.025877 seconds and 4 git commands to generate.