|
Packit |
a4aae4 |
# expect/tcl code to test the das parser and scanner
|
|
Packit |
a4aae4 |
# jhrg
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# $Log: test.5.exp,v $
|
|
Packit |
a4aae4 |
# Revision 1.7 2003/12/11 01:08:38 jimg
|
|
Packit |
a4aae4 |
# More fixes after resolving conflicts. This code still fails some tests.
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# Revision 1.6.10.1 2003/10/03 16:26:30 jimg
|
|
Packit |
a4aae4 |
# Fixed tests; I changed the text of das-test just a little and so these
|
|
Packit |
a4aae4 |
# had to be updated. I wanted to be sure that the error message was from
|
|
Packit |
a4aae4 |
# an exception and not just a write to stderr.
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# Revision 1.6 2000/06/16 18:15:01 jimg
|
|
Packit |
a4aae4 |
# Merged with 3.1.7
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# Revision 1.5.38.1 2000/06/15 02:24:57 jimg
|
|
Packit |
a4aae4 |
# Fixed the tests: problems with PATH, etc. broke the tests on my new machine
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# Revision 1.5 1997/05/13 23:29:27 jimg
|
|
Packit |
a4aae4 |
# *** empty log message ***
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# Revision 1.4 1996/05/14 15:40:52 jimg
|
|
Packit |
a4aae4 |
# These changes have already been checked in once before. However, I
|
|
Packit |
a4aae4 |
# corrupted the source repository and restored it from a 5/9/96 backup
|
|
Packit |
a4aae4 |
# tape. The previous version's log entry should cover the changes.
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# Revision 1.3 1994/12/09 21:45:50 jimg
|
|
Packit |
a4aae4 |
# Modified for new unix.exp.
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# Revision 1.2 1994/09/09 16:15:25 jimg
|
|
Packit |
a4aae4 |
# Fixed namign of the test (was given as $srcdir//$test_name, should have been
|
|
Packit |
a4aae4 |
# $srcdir$test_name).
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
# Revision 1.1 1994/08/29 19:57:23 jimg
|
|
Packit |
a4aae4 |
# Test procedures for the DAS parser, scanner and C++ class.
|
|
Packit |
a4aae4 |
#
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
global comp_output # contains output from das-test_start
|
|
Packit |
a4aae4 |
global verbose # this and srcdir are set by runtest.exp
|
|
Packit |
a4aae4 |
global srcdir
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
# The variable `test_name' is the name of the das input file for this test.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
set test_name test.5
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
# The variable `test_out' is a string that contains the text that should be
|
|
Packit |
a4aae4 |
# stored in comp_output by das-test_start. The two strings should match
|
|
Packit |
a4aae4 |
# exactly.
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
set test_out "Caught Error object:
|
|
Packit |
a4aae4 |
Error scanning DAS object text: Unterminated quote (starts on line 6)
|
|
Packit |
a4aae4 |
"
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
das-test_start p $srcdir/$test_name
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
if ![string compare $test_out $comp_output] { # check comp_output
|
|
Packit |
a4aae4 |
pass "$test_name"
|
|
Packit |
a4aae4 |
} else {
|
|
Packit |
a4aae4 |
fail "$test_name"
|
|
Packit |
a4aae4 |
}
|
|
Packit |
a4aae4 |
|
|
Packit |
a4aae4 |
|