aboutsummaryrefslogtreecommitdiff
path: root/gdb/testsuite/gdb.base
diff options
context:
space:
mode:
Diffstat (limited to 'gdb/testsuite/gdb.base')
-rw-r--r--gdb/testsuite/gdb.base/setshow.exp31
1 files changed, 29 insertions, 2 deletions
diff --git a/gdb/testsuite/gdb.base/setshow.exp b/gdb/testsuite/gdb.base/setshow.exp
index 661431c..d9e71d3 100644
--- a/gdb/testsuite/gdb.base/setshow.exp
+++ b/gdb/testsuite/gdb.base/setshow.exp
@@ -165,11 +165,38 @@ gdb_test_no_output "set height unlimited"
gdb_test_no_output "set history expansion on" "set history expansion on"
#test show history expansion on
gdb_test "show history expansion on" "History expansion on command input is on.*" "show history expansion"
+#get home directory path
+set HOME ""
+set test "show environment HOME"
+gdb_test_multiple $test $test {
+ -re "\nHOME = (.*).\n.*" {
+ set HOME $expect_out(1,string)
+ pass $test
+ }
+}
+#test set history filename ~/foobar.baz
+gdb_test_no_output "set history filename ~/foobar.baz" \
+ "set history filename ~/foobar.baz"
+#test show history filename ~/foobar.baz
+gdb_test "show history filename" \
+ "The filename in which to record the command history is \"$HOME/foobar.baz\"..*" \
+ "show history filename (~/foobar.baz)"
+#get current working directory
+set PWD ""
+set test "show working directory"
+gdb_test_multiple "pwd" $test {
+ -re "\nWorking directory (.*)..\n.*" {
+ set PWD $expect_out(1,string)
+ pass $test
+ }
+}
#test set history filename foobar.baz
gdb_test_no_output "set history filename foobar.baz" \
- "set history filename foobar.baz"
+ "set history filename foobar.baz"
#test show history filename foobar.baz
-gdb_test "show history filename" "The filename in which to record the command history is \"foobar.baz\"..*" "show history filename (foobar.baz)"
+gdb_test "show history filename" \
+ "The filename in which to record the command history is \"$PWD/foobar.baz\"..*" \
+ "show history filename (current_directory/foobar.baz)"
#test set history save on
gdb_test_no_output "set history save on" "set history save on"
#test show history save on