1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87
|
# expect/tcl code to test the das parser and scanner
# jhrg
#
# $Log: test.1.exp,v $
# Revision 1.9 2000/06/16 18:15:01 jimg
# Merged with 3.1.7
#
# Revision 1.8.38.1 2000/06/15 02:24:56 jimg
# Fixed the tests: problems with PATH, etc. broke the tests on my new machine
#
# Revision 1.8 1997/05/13 23:29:10 jimg
# *** empty log message ***
#
# Revision 1.7 1996/05/14 15:40:40 jimg
# These changes have already been checked in once before. However, I
# corrupted the source repository and restored it from a 5/9/96 backup
# tape. The previous version's log entry should cover the changes.
#
# Revision 1.6 1995/02/10 03:31:11 jimg
# Modified test cases for type checking.
#
# Revision 1.5 1994/12/09 21:45:45 jimg
# Modified for new unix.exp.
#
# Revision 1.4 1994/10/05 16:51:45 jimg
# Added TYPE to each of the DAS test files.
# The `expect' files correcly check for that in the output.
#
# Revision 1.3 1994/09/27 23:14:13 jimg
# Changed expected outcomes to match new das.print() mfunc.
#
# Revision 1.2 1994/09/09 16:15:20 jimg
# Fixed namign of the test (was given as $srcdir/$test_name, should have been
# $srcdir$test_name).
#
# Revision 1.1 1994/08/29 19:57:19 jimg
# Test procedures for the DAS parser, scanner and C++ class.
#
global comp_output # contains output from das-test_start
global verbose # this and srcdir are set by runtest.exp
global srcdir
# The variable `test_name' is the name of the das input file for this test.
set test_name test.1
# The variable `test_out' is a string that contains the text that should be
# stored in comp_output by das-test_start. The two strings should match
# exactly.
set test_out "Attributes {
var1 {
String name bob;
String type human;
Int32 age 19;
}
var2 {
String name joe;
String type dog;
Int32 age 8;
}
var3 {
Int32 size 8;
String color red;
String type art;
}
var4 {
}
var5 {
String height 5.0in.;
String units inches;
Float64 max 5.0;
String weight 100lbs;
String color red;
}
}"
das-test_start p $srcdir/$test_name
if ![string compare $test_out $comp_output] { # check comp_output
pass "$test_name"
} else {
fail "$test_name"
}
|