OpenCores
URL https://opencores.org/ocsvn/or1k/or1k/trunk

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.3/] [gdb/] [testsuite/] [gdb.chill/] [gch922.exp] - Blame information for rev 1765

Details | Compare with Previous | View Log

Line No. Rev Author Line
1 1181 sfurman
# OBSOLETE # Copyright 1995, 1996, 1997 Free Software Foundation, Inc.
2
# OBSOLETE
3
# OBSOLETE # This program is free software; you can redistribute it and/or modify
4
# OBSOLETE # it under the terms of the GNU General Public License as published by
5
# OBSOLETE # the Free Software Foundation; either version 2 of the License, or
6
# OBSOLETE # (at your option) any later version.
7
# OBSOLETE #
8
# OBSOLETE # This program is distributed in the hope that it will be useful,
9
# OBSOLETE # but WITHOUT ANY WARRANTY; without even the implied warranty of
10
# OBSOLETE # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11
# OBSOLETE # GNU General Public License for more details.
12
# OBSOLETE #
13
# OBSOLETE # You should have received a copy of the GNU General Public License
14
# OBSOLETE # along with this program; if not, write to the Free Software
15
# OBSOLETE # Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
16
# OBSOLETE
17
# OBSOLETE # Please email any bugs, comments, and/or additions to this file to:
18
# OBSOLETE # bug-gdb@prep.ai.mit.edu
19
# OBSOLETE
20
# OBSOLETE # This file tests various Chill values, expressions, and types.
21
# OBSOLETE
22
# OBSOLETE # This file was written by Wilfried Moser (moser@aut.alcatel.at)
23
# OBSOLETE #                       Kurt Fuchs (fuchs_k@aut.alcatel.at)
24
# OBSOLETE #
25
# OBSOLETE
26
# OBSOLETE if $tracelevel then {
27
# OBSOLETE      strace $tracelevel
28
# OBSOLETE }
29
# OBSOLETE
30
# OBSOLETE if [skip_chill_tests] then { continue }
31
# OBSOLETE
32
# OBSOLETE set testfile "gch922"
33
# OBSOLETE set srcfile ${srcdir}/$subdir/${testfile}.ch
34
# OBSOLETE set binfile ${objdir}/${subdir}/${testfile}.exe
35
# OBSOLETE if  { [compile "${srcfile} -g -w -o ${binfile} ${CHILL_RT0} ${CHILL_LIB}"] != "" } {
36
# OBSOLETE     perror "Couldn't compile ${srcfile}"
37
# OBSOLETE     return -1
38
# OBSOLETE }
39
# OBSOLETE
40
# OBSOLETE # Set the current language to chill.  This counts as a test.  If it
41
# OBSOLETE # fails, then we skip the other tests.
42
# OBSOLETE
43
# OBSOLETE proc set_lang_chill {} {
44
# OBSOLETE     global gdb_prompt
45
# OBSOLETE     global binfile objdir subdir
46
# OBSOLETE
47
# OBSOLETE     verbose "loading file '$binfile'"
48
# OBSOLETE     gdb_load $binfile
49
# OBSOLETE     send_gdb "set language chill\n"
50
# OBSOLETE     gdb_expect {
51
# OBSOLETE      -re ".*$gdb_prompt $" {}
52
# OBSOLETE      timeout { fail "set language chill (timeout)" ; return 0 }
53
# OBSOLETE     }
54
# OBSOLETE
55
# OBSOLETE     send_gdb "show language\n"
56
# OBSOLETE     gdb_expect {
57
# OBSOLETE      -re ".* source language is \"chill\".*$gdb_prompt $" {
58
# OBSOLETE          pass "set language to \"chill\""
59
# OBSOLETE          send_gdb "break xx_\n"
60
# OBSOLETE          gdb_expect {
61
# OBSOLETE              -re ".*$gdb_prompt $" {
62
# OBSOLETE                  send_gdb "run\n"
63
# OBSOLETE                  gdb_expect -re ".*$gdb_prompt $" {}
64
# OBSOLETE                  return 1
65
# OBSOLETE              }
66
# OBSOLETE              timeout {
67
# OBSOLETE                  fail "can't set breakpoint (timeout)"
68
# OBSOLETE                  return 0
69
# OBSOLETE              }
70
# OBSOLETE          }
71
# OBSOLETE      }
72
# OBSOLETE      -re ".*$gdb_prompt $" {
73
# OBSOLETE          fail "setting language to \"chill\""
74
# OBSOLETE          return 0
75
# OBSOLETE      }
76
# OBSOLETE      timeout {
77
# OBSOLETE          fail "can't show language (timeout)"
78
# OBSOLETE          return 0
79
# OBSOLETE      }
80
# OBSOLETE     }
81
# OBSOLETE }
82
# OBSOLETE
83
# OBSOLETE # Testing printing of a specific value.  Increment passcount for
84
# OBSOLETE # success or issue fail message for failure.  In both cases, return
85
# OBSOLETE # a 1 to indicate that more tests can proceed.  However a timeout
86
# OBSOLETE # is a serious error, generates a special fail message, and causes
87
# OBSOLETE # a 0 to be returned to indicate that more tests are likely to fail
88
# OBSOLETE # as well.
89
# OBSOLETE #
90
# OBSOLETE # Args are:
91
# OBSOLETE #
92
# OBSOLETE #    First one is string to send_gdb to gdb
93
# OBSOLETE #    Second one is string to match gdb result to
94
# OBSOLETE #    Third one is an optional message to be printed
95
# OBSOLETE
96
# OBSOLETE proc test_print_accept { args } {
97
# OBSOLETE     global gdb_prompt
98
# OBSOLETE     global passcount
99
# OBSOLETE     global verbose
100
# OBSOLETE
101
# OBSOLETE     if [llength $args]==3 then {
102
# OBSOLETE      set message [lindex $args 2]
103
# OBSOLETE     } else {
104
# OBSOLETE      set message [lindex $args 0]
105
# OBSOLETE     }
106
# OBSOLETE     set sendthis [lindex $args 0]
107
# OBSOLETE     set expectthis [lindex $args 1]
108
# OBSOLETE     set result [gdb_test $sendthis ".* = ${expectthis}" $message]
109
# OBSOLETE     if $result==0 {incr passcount}
110
# OBSOLETE     return $result
111
# OBSOLETE }
112
# OBSOLETE
113
# OBSOLETE
114
# OBSOLETE proc test_chars {} {
115
# OBSOLETE     global passcount gdb_prompt
116
# OBSOLETE
117
# OBSOLETE     verbose "Testing Chars"
118
# OBSOLETE     set passcount 0
119
# OBSOLETE
120
# OBSOLETE     test_print_accept "print a" {'\^\(0\)'//"Jason""\^\(0,5\)""Hugo\^\(10\)"//'\^\(1\)'}
121
# OBSOLETE     test_print_accept "print b" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
122
# OBSOLETE     test_print_accept "print c" {'a'//"\^\(0,5\)Jason"//'b'}
123
# OBSOLETE     test_print_accept "print d" {'\^\(11\)'}
124
# OBSOLETE
125
# OBSOLETE     gdb_test "set var a := (100)'\^(0,255)'" ""
126
# OBSOLETE     test_print_accept "print a" {"\^\(0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255,0,255\)"}
127
# OBSOLETE
128
# OBSOLETE     send_gdb "set var a := (10)'\^(1)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\" \n" ; gdb_expect -re "$gdb_prompt $"
129
# OBSOLETE     test_print_accept "print a" {"\^\(1,1,1,1,1,1,1,1,1,1\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
130
# OBSOLETE     send_gdb "set var b := \"Hugo \"\"\^(3,4)\"\"Otto\^(17)\" \n" ; gdb_expect -re "$gdb_prompt $"
131
# OBSOLETE     test_print_accept "print b" {"Hugo ""\^\(3,4\)""Otto\^\(17\)"}
132
# OBSOLETE     send_gdb "set var c := (70)'b' // \"\^(2,3)Hugo \" // (70)'c' \n" ; gdb_expect -re "$gdb_prompt $"
133
# OBSOLETE     test_print_accept "print c" {'b'//"\^\(2,3\)Hugo "//'c'}
134
# OBSOLETE     gdb_test "set var d := '\^(199)'" ""
135
# OBSOLETE     test_print_accept "print d" {'\^\(199\)'}
136
# OBSOLETE
137
# OBSOLETE     test_print_accept "print (10)'\^(0)'//(26)\"\^(66,67)\"//\" \"//'I'//' '//'a'//'m'//\" Hugo\"" {"\^\(0,0,0,0,0,0,0,0,0,0\)BCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBCBC I am Hugo"}
138
# OBSOLETE     test_print_accept "print \"Jason\"\"\^(0,5)\"\"Hugo\^(10)\"" {"Jason""\^\(0,5\)""Hugo\^\(10\)"}
139
# OBSOLETE
140
# OBSOLETE     send_gdb "set var a := \"\" \n" ; gdb_expect -re "$gdb_prompt $"
141
# OBSOLETE     test_print_accept "print a" {""}
142
# OBSOLETE     send_gdb "set var a := \"\"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
143
# OBSOLETE     test_print_accept "print a" {""""}
144
# OBSOLETE     send_gdb "set var a := \" \"\"\" \n" ; gdb_expect -re "$gdb_prompt $"
145
# OBSOLETE     test_print_accept "print a" {" """}
146
# OBSOLETE     send_gdb "set var a := \"\^\^\" \n" ; gdb_expect -re "$gdb_prompt $"
147
# OBSOLETE     test_print_accept "print a" {"\^\^"}
148
# OBSOLETE     send_gdb "set var a := \"'\" \n" ; gdb_expect -re "$gdb_prompt $"
149
# OBSOLETE     test_print_accept "print a" {"'"}
150
# OBSOLETE }
151
# OBSOLETE
152
# OBSOLETE
153
# OBSOLETE proc test_code {} {
154
# OBSOLETE     global passcount gdb_prompt
155
# OBSOLETE
156
# OBSOLETE     verbose "Testing Chars"
157
# OBSOLETE     set passcount 0
158
# OBSOLETE
159
# OBSOLETE     runto bulk
160
# OBSOLETE     test_print_accept "print a" {"\^\(255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127,255,0,222,127\)"}
161
# OBSOLETE     test_print_accept "print b" {"\^\(200\)"}
162
# OBSOLETE #    test_print_accept "print c" {'a'//"\^\(0,5\)Jason"//'b'}
163
# OBSOLETE     test_print_accept "print d" {'a'}
164
# OBSOLETE }
165
# OBSOLETE
166
# OBSOLETE
167
# OBSOLETE # Start with a fresh gdb.
168
# OBSOLETE
169
# OBSOLETE gdb_exit
170
# OBSOLETE gdb_start
171
# OBSOLETE gdb_reinitialize_dir $srcdir/$subdir
172
# OBSOLETE
173
# OBSOLETE gdb_test "set print sevenbit-strings" ".*"
174
# OBSOLETE
175
# OBSOLETE
176
# OBSOLETE if [set_lang_chill] then {
177
# OBSOLETE     # test builtins as described in chapter 6.20.3 Z.200
178
# OBSOLETE
179
# OBSOLETE     test_chars
180
# OBSOLETE #    test_code
181
# OBSOLETE } else {
182
# OBSOLETE     warning "$test_name tests suppressed."
183
# OBSOLETE }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.