1
0
mirror of git://projects.qi-hardware.com/fped.git synced 2024-11-22 20:11:53 +02:00
fped/test/structure
werner 02518334f2 Updated regression tests for output change in r5974 and improved handling of
cores.

- test/structure, test/del_vec, test/frame_ref, test/meas_qual, test/del_frame:
  added newline after "unit" directive (reported by Xiangfu Liu)
- test/Common: new function expect_sed for post-processing of test output
- test/tsort: use expect_sed to ignore "(core dumped") after "Aborted"
- test/Common: if there is a file called "core", don't run it
- Makefile (clean): remove test/core



git-svn-id: http://svn.openmoko.org/trunk/eda/fped@5978 99fdad57-331a-0410-800a-d7fa5415bdb3
2010-10-12 15:32:15 +00:00

112 lines
1.8 KiB
Bash
Executable File

#!/bin/sh
. ./Common
###############################################################################
fped_dump "structure: empty file" <<EOF
EOF
expect <<EOF
/* MACHINE-GENERATED ! */
package "_"
unit mm
EOF
#------------------------------------------------------------------------------
fped_dump "structure: just an empty frame definition" <<EOF
frame foo {
}
EOF
expect <<EOF
/* MACHINE-GENERATED ! */
frame foo {
}
package "_"
unit mm
EOF
#------------------------------------------------------------------------------
fped_dump "structure: just the package name" <<EOF
package "hello"
EOF
expect <<EOF
/* MACHINE-GENERATED ! */
package "hello"
unit mm
EOF
#------------------------------------------------------------------------------
fped_dump "structure: just the unit" <<EOF
unit mil
EOF
expect <<EOF
/* MACHINE-GENERATED ! */
package "_"
unit mil
EOF
#------------------------------------------------------------------------------
fped_dump "structure: just one root frame item" <<EOF
vec @(1mm, 1mm)
EOF
expect <<EOF
/* MACHINE-GENERATED ! */
package "_"
unit mm
__0: vec @(1mm, 1mm)
EOF
#------------------------------------------------------------------------------
fped_dump "structure: frame plus measurement" <<EOF
frame f {
a: vec @(0mm, 0mm)
b: vec @(1mm, 1mm)
}
frame f @
meas f.a -> f.b
EOF
expect <<EOF
/* MACHINE-GENERATED ! */
frame f {
a: vec @(0mm, 0mm)
b: vec @(1mm, 1mm)
}
package "_"
unit mm
frame f @
meas f.a -> f.b
EOF
#------------------------------------------------------------------------------
fped_fail "structure: measurement in frame" <<EOF
frame f {
a: vec @(0mm, 0mm)
b: vec @(1mm, 1mm)
meas f.a -> f.b
}
EOF
expect <<EOF
4: syntax error near "meas"
EOF
###############################################################################