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
|
# expect/tcl code to test the expression parser and scanner. This test checks
# to see that the expr parser correctly rejects arrays that are partially
# constrained. 6/11/2002 jhrg
global comp_output # contains output from das-test_start
global verbose # this and srcdir are set by runtest.exp
global srcdir
# The variable `test_file' is the name of the das input file for this test.
set test_name test.v
set test_file test.6
# The variable test_equation is the equation to test.
set test_equation {i\[1:4:9\]}
# 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 "The complete DDS:
Dataset {
Int32 i\\\[20\\\]\\\[10\\\];
String s;
} test1;
Error: *"
expr-test_start p ${srcdir}/${test_file} ${test_equation}
if [string match $test_out $comp_output] { # check comp_output
pass "$test_name"
} else {
fail "$test_name"
}
expr-test_start P ${srcdir}/${test_file} ${test_equation}
if [string match $test_out $comp_output] { # check comp_output
pass "$test_name"
} else {
fail "$test_name"
}
|