Root/test/dbg_meas

Source at commit 377b7f81193685f23c93546767a059e194419446 created 3 years 5 months ago.
By Werner Almesberger, fped.c: new option -m (for -p and -P) to suppress showing measurements
1#!/bin/sh
2. ./Common
3
4###############################################################################
5
6fped "%meas: print mm (default)" <<EOF
7a: vec @(0mm, 0mm)
8b: vec @(3mm, 4mm)
9meas a >> b /* work-around to simplify grammar */
10m: meas a >> b
11%meas m
12EOF
13expect <<EOF
145
15EOF
16
17#------------------------------------------------------------------------------
18
19fped "%meas: print mil" <<EOF
20unit mil
21a: vec @(0mm, 0mm)
22b: vec @(2.54mm, 0mm)
23meas a >> b /* work-around to simplify grammar */
24m: meas a >> b
25%meas m
26EOF
27expect <<EOF
28100
29EOF
30
31#------------------------------------------------------------------------------
32
33fped_fail "%meas: invalid ID" <<EOF
34%meas m
35EOF
36expect <<EOF
371: unknown object "m" near "m"
38EOF
39
40#------------------------------------------------------------------------------
41
42fped_fail "%meas: measurement not instantiated" <<EOF
43a: vec @(0mm, 0mm)
44loop i = 1, 0
45b: vec @(i*1mm, 0mm)
46meas a >> b /* work-around to simplify grammar */
47m: meas a >> b
48%meas m
49EOF
50expect <<EOF
51measurement "m" was not instantiated
52EOF
53
54###############################################################################
55

Archive Download this file

Branches:
master



interactive