# expect/tcl code to test the das parser and scanner
# jhrg
#
# $Log: test.15.exp,v $
# Revision 1.10  2002/06/03 22:21:16  jimg
# Merged with release-3-2-9
#
# Revision 1.9.4.1  2001/11/01 00:43:52  jimg
# Fixes to the scanners and parsers so that dataset variable names may
# start with digits. I've expanded the set of characters that may appear
# in a variable name and made it so that all except `#' may appear at
# the start. Some characters are not allowed in variables that appear in
# a DDS or CE while they are allowed in the DAS. This makes it possible
# to define containers with names like `COARDS:long_name.' Putting a colon
# in a variable name makes the CE parser much more complex. Since the set
# of characters that people want seems pretty limited (compared to the
# complete ASCII set) I think this is an OK approach. If we have to open
# up the expr.lex scanner completely, then we can but not without adding
# lots of action clauses to teh parser. Note that colon is just an example,
# there's a host of characters that are used in CEs that are not allowed
# in IDs.
#
# Revision 1.9  2000/09/22 02:52:59  jimg
# Fixes to the tests to recognize some of the new error messages. Also,
# the test drivers were modified to catch the exceptions now thrown by
# some of the parsers.
#
# Revision 1.8  2000/06/16 18:15:01  jimg
# Merged with 3.1.7
#
# Revision 1.7.10.1  2000/06/15 02:24:57  jimg
# Fixed the tests: problems with PATH, etc. broke the tests on my new machine
#
# Revision 1.7  1999/03/24 23:42:22  jimg
# Added or updated for the new simple types (Int16, UInt16 and Float32)
#
# Revision 1.6  1997/05/13 23:29:16  jimg
# *** empty log message ***
#
# Revision 1.5  1997/03/27 18:19:55  jimg
# Update for version 2.13
#
# Revision 1.4  1996/11/13 19:23:42  jimg
# *** empty log message ***
#
# Revision 1.3  1996/08/12 22:22:16  jimg
# Changed for the new error message text from the parser.
#
# Revision 1.2  1996/05/14 15:40:46  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.1  1995/02/16  15:34:50  jimg
# Added these tests. See comments in files in parent directory.
#

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.15

# 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 {
        var1_dods_errors {
            Int32 i1 3.0;
            String i1_explanation \"`3.0' is not an Int32 value.\";
        }
    }
}"

das-test_start p $srcdir/$test_name

if ![string compare $test_out $comp_output] { # check comp_output
    pass "$test_name"
} else {
    fail "$test_name"
}
