Root/
Source at commit 8a1a3103964533b0d517a29312ddeabdab1d6271 created 9 years 2 months ago. By Werner Almesberger, inst.c (find_point_vec): correct indentation | |
---|---|
1 | #!/bin/sh |
2 | . ./Common |
3 | |
4 | ############################################################################### |
5 | |
6 | fped "iprint: loop" <<EOF |
7 | loop x = 1, 3 |
8 | %iprint x |
9 | EOF |
10 | expect <<EOF |
11 | 1 |
12 | 2 |
13 | 3 |
14 | EOF |
15 | |
16 | #------------------------------------------------------------------------------ |
17 | |
18 | fped "iprint: two tables (independent)" <<EOF |
19 | table { a } { 1 } { 2 } |
20 | table { b } { 3 } { 4 } |
21 | |
22 | %iprint a*10+b |
23 | EOF |
24 | expect <<EOF |
25 | 13 |
26 | 14 |
27 | 23 |
28 | 24 |
29 | EOF |
30 | |
31 | #------------------------------------------------------------------------------ |
32 | |
33 | fped "iprint: two tables (2nd references 1st)" <<EOF |
34 | table { a } { 1 } { 2 } |
35 | table { b } { 3+a } { 4+a } |
36 | |
37 | %iprint a*10+b |
38 | EOF |
39 | expect <<EOF |
40 | 14 |
41 | 15 |
42 | 25 |
43 | 26 |
44 | EOF |
45 | |
46 | #------------------------------------------------------------------------------ |
47 | |
48 | fped "iprint: two tables (1st references 2nd)" <<EOF |
49 | table { a } { 1+b } { 2+b } |
50 | table { b } { 3 } { 4 } |
51 | |
52 | %iprint a*10+b |
53 | EOF |
54 | expect <<EOF |
55 | 43 |
56 | 54 |
57 | 53 |
58 | 64 |
59 | EOF |
60 | |
61 | #------------------------------------------------------------------------------ |
62 | |
63 | fped "iprint: inside frame (global variable)" <<EOF |
64 | frame foo { |
65 | %iprint n |
66 | } |
67 | |
68 | loop n = 1, 2 |
69 | frame foo @ |
70 | EOF |
71 | expect <<EOF |
72 | 1 |
73 | 2 |
74 | EOF |
75 | |
76 | #------------------------------------------------------------------------------ |
77 | |
78 | fped "iprint: inside frame (local variable) " <<EOF |
79 | frame foo { |
80 | set n1 = n+1 |
81 | %iprint n1 |
82 | } |
83 | |
84 | loop n = 1, 2 |
85 | frame foo @ |
86 | EOF |
87 | expect <<EOF |
88 | 2 |
89 | 3 |
90 | EOF |
91 | |
92 | #------------------------------------------------------------------------------ |
93 | |
94 | fped_fail "iprint: undefined variable" <<EOF |
95 | %iprint foo |
96 | EOF |
97 | expect <<EOF |
98 | undefined variable "foo" |
99 | EOF |
100 | |
101 | #------------------------------------------------------------------------------ |
102 | |
103 | fped_dump "iprint: dump" <<EOF |
104 | %iprint 42 |
105 | EOF |
106 | expect <<EOF |
107 | 42 |
108 | /* MACHINE-GENERATED ! */ |
109 | |
110 | package "_" |
111 | unit mm |
112 | |
113 | %iprint 42 |
114 | EOF |
115 | |
116 | ############################################################################### |
117 |
Branches:
master