From e300da1c7ddf8d090d6d26c2b60b8813807d571e Mon Sep 17 00:00:00 2001 From: Per Bothner Date: Fri, 1 Dec 1995 22:17:42 +0000 Subject: [PATCH] * pr-8405.ch, pr-8405.exp, Makefile.in: New test case. --- gdb/testsuite/gdb.chill/.Sanitize | 2 + gdb/testsuite/gdb.chill/ChangeLog | 2 + gdb/testsuite/gdb.chill/Makefile.in | 2 +- gdb/testsuite/gdb.chill/pr-8405.ch | 19 ++++++++++ gdb/testsuite/gdb.chill/pr-8405.exp | 57 +++++++++++++++++++++++++++++ 5 files changed, 81 insertions(+), 1 deletion(-) create mode 100644 gdb/testsuite/gdb.chill/pr-8405.ch create mode 100644 gdb/testsuite/gdb.chill/pr-8405.exp diff --git a/gdb/testsuite/gdb.chill/.Sanitize b/gdb/testsuite/gdb.chill/.Sanitize index 90627482172..cb8773b485c 100644 --- a/gdb/testsuite/gdb.chill/.Sanitize +++ b/gdb/testsuite/gdb.chill/.Sanitize @@ -56,6 +56,8 @@ pr-6632.exp pr-8134.exp pr-8136.ch pr-8136.exp +pr-8405.ch +pr-8405.exp result.ch result.exp string.ch diff --git a/gdb/testsuite/gdb.chill/ChangeLog b/gdb/testsuite/gdb.chill/ChangeLog index dfe4e07b5e7..a65b586f8dc 100644 --- a/gdb/testsuite/gdb.chill/ChangeLog +++ b/gdb/testsuite/gdb.chill/ChangeLog @@ -1,5 +1,7 @@ Fri Dec 1 00:08:37 1995 Per Bothner + * pr-8405.ch, pr-8405.exp, Makefile.in: New test case. + * tests1.exp, tests2.exp (test_print_reject): Remove; causes conflicts with later tests using test_print_reject in ../lib/gdb.exp. (passcount): Remove. diff --git a/gdb/testsuite/gdb.chill/Makefile.in b/gdb/testsuite/gdb.chill/Makefile.in index 31899100a7f..23f12518433 100644 --- a/gdb/testsuite/gdb.chill/Makefile.in +++ b/gdb/testsuite/gdb.chill/Makefile.in @@ -4,7 +4,7 @@ VPATH = @srcdir@ PROGS = callch.exe chillvars.exe misc.exe result.exe string.exe \ tests1.exe tests2.exe tuples.exe \ pr-4975.exe pr-5016.exe pr-5020.exe pr-5022.exe pr-5646.exe \ - pr-5984.exe pr-6292.exe pr-6632.exe pr-8136.exe + pr-5984.exe pr-6292.exe pr-6632.exe pr-8136.exe pr-8405.exe all: @echo "Nothing to be done for all..." diff --git a/gdb/testsuite/gdb.chill/pr-8405.ch b/gdb/testsuite/gdb.chill/pr-8405.ch new file mode 100644 index 00000000000..a9b25312d6e --- /dev/null +++ b/gdb/testsuite/gdb.chill/pr-8405.ch @@ -0,0 +1,19 @@ +emptybit: MODULE + +SYNMODE b8 = BOOLS(8); +SYN bit8 b8 = B'00000000'; + +SYNMODE char_m = CHARS(40) VARYING; + +SYNMODE stru_m = STRUCT (c char_m, b b8, boo BOOL); +DCL xx stru_m; + +SYNMODE m_stru = STRUCT (c char_m, i LONG, boo BOOL); +DCL yy m_stru; + +SYNMODE m_arr = ARRAY (1:10) LONG; +DCL zz m_arr; + +WRITETEXT (stdout, "%C%/", bit8); + +END emptybit; diff --git a/gdb/testsuite/gdb.chill/pr-8405.exp b/gdb/testsuite/gdb.chill/pr-8405.exp new file mode 100644 index 00000000000..45579699626 --- /dev/null +++ b/gdb/testsuite/gdb.chill/pr-8405.exp @@ -0,0 +1,57 @@ +# Copyright (C) 1995 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 +# the Free Software Foundation; either version 2 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ + +# Please email any bugs, comments, and/or additions to this file to: +# bug-gdb@prep.ai.mit.edu + +# This file was written by Per Bothner. (bothner@cygnus.com) + +if $tracelevel then { + strace $tracelevel +} + +proc do_tests {} { + global prms_id bug_id subdir objdir srcdir binfile prompt + + set prms_id 0 + set bug_id 0 + + # Start with a fresh gdb. + + gdb_exit + gdb_start + gdb_reinitialize_dir $srcdir/$subdir + gdb_load $objdir/$subdir/$binfile + + send "set language chill\n" ; expect -re "$prompt $" + send "set var \$i:=xx\n" ; expect -re "$prompt $" + gdb_test "print \$i" {= \[.c: "", .b: B'00000000', .boo: FALSE\]} +} + +# Check to see if we have an executable to test. If not, then either we +# haven't tried to compile one, or the compilation failed for some reason. +# In either case, just notify the user and skip the tests in this file. + +set binfile "pr-8405.exe" +set srcfile $binfile.ch + +if [skip_chill_tests] then { continue } + +if ![file exists $objdir/$subdir/$binfile] then { + warning "$binfile does not exist; tests suppressed." 0 +} else { + do_tests +} -- 2.30.2