# expect/tcl code to test the dds parser and scanner
# jhrg
#
# $Log: test.10.exp,v $
# Revision 1.9  2003/05/16 00:15:57  jimg
# Test changes because List has been removed from the DAP.
#
# Revision 1.8  2000/10/03 22:18:04  jimg
# Fixes to the tests to accomodate debugging fixes in DDS.cc
#
# Revision 1.7  2000/06/16 18:15:01  jimg
# Merged with 3.1.7
#
# Revision 1.6.6.1  2000/06/15 02:24:57  jimg
# Fixed the tests: problems with PATH, etc. broke the tests on my new machine
#
# Revision 1.6  1999/04/29 02:29:39  jimg
# Merge of no-gnu branch
#
# Revision 1.5  1997/03/27 18:20:07  jimg
# Update for version 2.13
#
# Revision 1.4  1996/05/14 15:41:33  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.3  1995/12/06  21:58:47  jimg
# Removed `List List' variables.
#
# Revision 1.2  1995/01/19  22:05:20  jimg
# Fixed for new class hierarchy.
#
# Revision 1.1  1994/12/21  17:01:26  jimg
# Added these to the testsuite.
#

global comp_output		# contains output from dds-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.10

# 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 "DDS past semantic check
DDS past full semantic check
Dataset {
    Structure {
        Int32 i;
        Int32 j;
    } test;
    Sequence {
        Int32 i;
        Int32 j\[10\];
    } test2;
    Grid {
     ARRAY:
        Float64 f\[10\]\[10\];
     MAPS:
        Int32 g\[10\];
        Int32 h\[10\];
    } test4;
    Sequence {
        String name;
        Int32 age;
    } person;
    Structure {
        Int32 j;
        Int32 i;
        Structure {
            Int32 i;
            Float64 f\[10\];
        } data;
    } exp;
    Grid {
     ARRAY:
        Float64 g\[10\]\[10\]\[10\];
     MAPS:
        Float64 lat\[10\];
        Float64 lon\[10\];
        Float64 weirdness\[10\];
    } strange;
} data6;"

dds-test_start p $srcdir/$test_name

#send_user "comp_output: $comp_output\n"
#send_user "test_out: $test_out\n"
#send_user "Result of compare: [string compare $test_out $comp_output]\n"
#send_user "Length of test_out: [string length $test_out]\n"
#send_user "Length of comp_output: [string length $comp_output]\n"
#
#set test_out [string trim $test_out]
#set comp_output [string trim $comp_output]
#
#send_user "Result of compare: [string compare $test_out $comp_output]\n"
#send_user "Length of test_out: [string length $test_out]\n"
#send_user "Length of comp_output: [string length $comp_output]\n"
#send_user "Result of first: [string first $test_out $comp_output]\n"
#send_user "Result of last: [string last $test_out $comp_output]\n"

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


