-# Copyright (C) 1992-2015 Free Software Foundation, Inc.
+# Copyright (C) 1992-2019 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
standard_testfile
-if {[prepare_for_testing $testfile.exp $testfile $srcfile debug]} {
- untested $testfile.exp
+if {[prepare_for_testing "failed to prepare" $testfile $srcfile debug]} {
return -1
}
gdb_test "print \$bar" " = void" \
"Print contents of uninitialized convenience variable"
+
+
+ gdb_test "print \$str = \"some string\"" \
+ " = \"some string\"" \
+ "Set convenience variable to string value"
+ gdb_test "print \$str = \"some other string\"" \
+ " = \"some other string\"" \
+ "Change convenience variable to different string value"
+
+ gdb_test "print \$arr = {1, 2, 3}" \
+ " = \\{1, 2, 3\\}" \
+ "Set convenience variable to array value"
+ gdb_test "print \$arr = {0, 1, 2, 3}" \
+ " = \\{0, 1, 2, 3\\}" \
+ "Set convenience variable to different array value"
}
proc test_convenience_functions {} {