#!/bin/sh
#
# Test results last captured at "Wed Mar  9 19:48:20 PST 2005"
#
# This is an IBIS icm test program
#
# It is a self-contained package of all of the 
# files and data required to run an icm parser test.
#
# Usage:  ./test_070  <arg>
#
# <nothing>               = Run the test silently in GNU check mode
# "Brief"                 = Run the test.
#                           If there is no error, produce a one line summary
#                           Otherwise, produce a full test report.
# "Full"                  = Run the test and always produce a full test report
# "Capture"               = Capture test results and REWRITE the test program
# "Extract"               = Extract the .icm and .out files
#

Test=`basename $0`
Synopsis="[Comment Char] may use only certain characters"
ExitStatus="0"
Counters="ERRORS: 0 WARNINGS: 0"
ExtraFiles="test_model_1.jpg"

Description=`grep -v '^EOF$' <<'EOF'
There are many [Comment Char] keywords in this file, using all of the
allowed 'comment characters', and all of the permitted keyword locations
in this file.

No errors are expected.
EOF`

Output=`grep -v '^EOF$' <<'EOF'
IBIS ICM Parser, version 1.1.0
Finished. ERRORS: 0 WARNINGS: 0
EOF`

ICM=`grep -v '^EOF$' <<'EOF'

This line is ignored
|**********************************************************************
[Begin Header]
[ICM Ver]             1.0
[Comment Char]        !_char
! THIS IS A COMMENT
[File Name]           test_070.icm
[Comment Char]        "_char
" THIS IS A COMMENT
[File Rev]            0.1
[Comment Char]        #_char
# THIS IS A COMMENT
[Date]                October 8, 2003
[Comment Char]        $_char
$ THIS IS A COMMENT
[Source]              Kelly C. Green

[Comment Char]        %_char
% THIS IS A COMMENT
[Notes]               This is the minimum correct file

                      It will be used as a basis for systematic
                      feature tests

[Comment Char]        &_char
& THIS IS A COMMENT
[Disclaimer]          No license, express or implied, by estoppel or 
                      otherwise, to any intellectual property rights is 
                      granted by this document. 

                      No warranty of any kind.  No support of any kind.
                      Use this file entirely at your own risk.

[Comment Char]        '_char
' THIS IS A COMMENT
[Copyright]           None - public domain
[Comment Char]        (_char
( THIS IS A COMMENT
[Support]             http://www.vhdl.org/pub/ibis/
[Comment Char]        )_char
) THIS IS A COMMENT
[Redistribution]      No
[Comment Char]        *_char
* THIS IS A COMMENT
[Redistribution Text] You may do anything you wish to this file.
[Comment Char]        ,_char
, THIS IS A COMMENT
[End Header]
[Comment Char]        |_char
| THIS IS A COMMENT

|**********************************************************************
|
[Comment Char] |_char
| THIS IS A COMMENT
|
|**********************************************************************

[Begin ICM Family]        Template test file
[Comment Char]        :_char
: THIS IS A COMMENT
[Manufacturer]            None
[Comment Char]        ;_char
; THIS IS A COMMENT
[ICM Family Description]  This file is a template from which most 
                          subsequent test files will be derived.
[Comment Char]        |_char
| THIS IS A COMMENT

|**********************************************************************
[ICM Model List] 
|  Name             Mating   Min_Slew_Time   Image
|
   TestModel1       Mated    100ps           test_model_1.jpg
|
|          SectA
| Port1 >---------< Port2
|
|**********************************************************************
[Begin ICM Model] TestModel1
ICM_model_type SLM_general
SGR 1:1
|
[Comment Char]        <_char
< THIS IS A COMMENT
[Tree Path Description]
  Model_pinmap Port1
  Section Mult=1 SectA
  Model_pinmap Port2
[Comment Char]        |_char
|
[Comment Char]        >_char
> THIS IS A COMMENT
[End ICM Model]
[Comment Char]        |_char
| THIS IS A COMMENT
|
|**********************************************************************
[ICM Pin Map] Port1
Pin_order Row_ordered
Num_of_rows = 1
Num_of_columns = 2
Pin_list
|Pin Name
A1 SIG1_IN
A2 SIG2_IN

[Comment Char]        ?_char
? THIS IS A COMMENT
[Comment Char]        |_char
[ICM Pin Map] Port2
Pin_order Row_ordered
Num_of_rows = 1
Num_of_columns = 2
Pin_list
|Pin Name
B1 SIG1_OUT
B2 SIG2_OUT

[Comment Char]        @_char
@ THIS IS A COMMENT
[End ICM Family]
[Comment Char]        |_char
| THIS IS A COMMENT
|
|**********************************************************************
[Begin ICM Section] SectA
[Comment Char]        \\_char  \\ test artifact - need to shell escape this char
\\ THIS IS A COMMENT
[Derivation Method] Lumped
[Comment Char]        ^_char
^ THIS IS A COMMENT
[Resistance Matrix] Diagonal_matrix
1.0mohm
1.0e-3
[Comment Char]        \`_char    \` test artifact - need to shell escape this char
\` THIS IS A COMMENT
[Inductance Matrix] Diagonal_matrix
4.0nh
4.0e-9
[Comment Char]        {_char
{ THIS IS A COMMENT
[Capacitance Matrix] Diagonal_matrix
2.0pf
2.0e-12
[Comment Char]        }_char
} THIS IS A COMMENT
[End ICM Section] SectA
[Comment Char]        ~_char
~ THIS IS A COMMENT
[Comment Char]        |_char
| THIS IS A COMMENT

|**********************************************************************
[End]
|**********************************************************************
This line is ignored
EOF`

#
# we are either running the test directly in the test directory
# or are running make check.  make sets the srcdir variable
# so we can tell the difference easily
#

if [ -z "${srcdir}" ]
then
    srcdir="."
    exedir="../../src"
else
    srcdir="${srcdir}/v_1_0"
    exedir="../src"
fi

export srcdir exedir Test Synopsis ExitStatus Counters ExtraFiles Description Output ICM

exec ${srcdir}/run_test "$@"
