-# Copyright 1997-2001, 2003, 2007-2012 Free Software Foundation, Inc.
+# Copyright 1997-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
# display.exp Test display commands
# Also do some printing stuff for coverage's sake.
#
-if $tracelevel then {
- strace $tracelevel
-}
-
-set testfile display
-set srcfile ${testfile}.c
-set binfile ${objdir}/${subdir}/${testfile}
-
+standard_testfile
-
-if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable {debug nowarnings}] != "" } {
+if {[prepare_for_testing $testfile.exp $testfile $srcfile \
+ {debug nowarnings}]} {
untested display.exp
return -1
}
# use this to debug:
#log_user 1
-gdb_exit
-gdb_start
-gdb_reinitialize_dir $srcdir/$subdir
-gdb_load ${binfile}
-
# Some coverage stuff
#
if !$use_gdb_stub {
# play with "print", too
#
-gdb_test "print/z j" ".*Undefined output format.*"
+gdb_test "print/k j" ".*Undefined output format.*"
gdb_test "print/d j" " = 0\[\\r\\n\]+" "debug test output 1"
gdb_test "print/r j" " = 0\[\\r\\n\]+" "debug test output 1a"
gdb_test "print/x j" " = 0x0\[\\r\\n\]+" "debug test output 2"