Blame unit-tests/das-testsuite/das-test.0/test.11.exp

Packit a4aae4
# expect/tcl code to test the das parser and scanner
Packit a4aae4
# jhrg
Packit a4aae4
#
Packit a4aae4
# $Log: test.11.exp,v $
Packit a4aae4
# Revision 1.7  2000/06/16 18:15:01  jimg
Packit a4aae4
# Merged with 3.1.7
Packit a4aae4
#
Packit a4aae4
# Revision 1.6.22.1  2000/06/15 02:24:56  jimg
Packit a4aae4
# Fixed the tests: problems with PATH, etc. broke the tests on my new machine
Packit a4aae4
#
Packit a4aae4
# Revision 1.6  1998/08/13 22:10:13  jimg
Packit a4aae4
# Bytes now are unsigned (0..255). Fixed this test to check that.
Packit a4aae4
#
Packit a4aae4
# Revision 1.5  1997/08/25 18:39:48  jimg
Packit a4aae4
# Removed errant double semicolon at the end of the Url attribute - replaced
Packit a4aae4
# it with a single semicolon.
Packit a4aae4
#
Packit a4aae4
# Revision 1.4  1997/05/13 23:29:11  jimg
Packit a4aae4
# *** empty log message ***
Packit a4aae4
#
Packit a4aae4
# Revision 1.3  1996/08/12 22:22:12  jimg
Packit a4aae4
# Changed for the new error message text from the parser.
Packit a4aae4
#
Packit a4aae4
# Revision 1.2  1996/04/05 22:00:12  jimg
Packit a4aae4
# Misc Changes for release 2.0.1 of the core software - for developers.
Packit a4aae4
#
Packit a4aae4
# Revision 1.1  1995/02/16  15:34:45  jimg
Packit a4aae4
# Added these tests. See comments in files in parent directory.
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.11
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 "Attributes {
Packit a4aae4
    test {
Packit a4aae4
        String names this, is, a, vector, of, strings;
Packit a4aae4
        Byte b 1, 0, 127, 255;
Packit a4aae4
        Int32 int_vec 1, 2, 2147483647;
Packit a4aae4
        Float64 float_vec 1.0, -1.0, +1.0, 0.2, -0.2, +0.2, .3, -.3, +.3, -3.1415, -3.1415e-99, -3.1415e+99, +3.1415e-99, -3., +2., 4.;
Packit a4aae4
        Url where http://bozo.place.com/home.html;
Packit a4aae4
    }
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
}