Develop and Download Open Source Software

Browse Subversion Repository

Contents of /branches/ttcomtester/tests/macroparam.ttl

Parent Directory Parent Directory | Revision Log Revision Log


Revision 10521 - (show annotations) (download)
Fri Jan 20 16:03:38 2023 UTC (13 months, 2 weeks ago) by zmatsuo
File size: 2337 byte(s)
add communication test tool
1 if paramcnt <= 1 goto error
2
3 ;
4 ; params[] 未実装のバージョン用の params[] エミュレート
5 ;
6 ifdefined params
7 if result = 0 then
8 strdim params paramcnt+1
9
10 for i 1 paramcnt
11 sprintf2 cmd 'params[%d] = param%d' i i
12 execcmnd cmd
13 next
14 endif
15
16 testnum = 0
17
18 for i 2 paramcnt
19 if testnum = 0 then
20 strmatch params[i] "test[1-9]"
21 if result then
22 testnum = i
23 break
24 endif
25 endif
26 next
27
28 if testnum then
29 sprintf2 cmd 'goto %s' params[testnum]
30 execcmnd cmd
31 endif
32
33
34 goto error
35
36
37 :test1
38 ; ttpmacro.exe macrofile /vxx /ixx /V /i test1
39 ;
40 ; 以下のように解釈する事にする
41 ; paramcnt: 6
42 ; param2: /vxx
43 ; param3: /ixx
44 ; param4: /V
45 ; param5: /i
46 ; param6: test1
47 ;
48 if paramcnt <> 6 goto error
49 strcompare params[2] "/vxx"
50 if result <> 0 goto error
51 strcompare params[3] "/ixx"
52 if result <> 0 goto error
53 strcompare params[4] "/V"
54 if result <> 0 goto error
55 strcompare params[5] "/i"
56 if result <> 0 goto error
57 strcompare params[6] "test1"
58 if result <> 0 goto error
59
60 goto end
61
62 :test2
63 ; ttpmacro.exe /V /i macrofile /v /I test2
64 ;
65 ; paramcnt: 4
66 ; param2: /v
67 ; param3: /I
68 ; param4: test2
69 ;
70 if paramcnt <> 4 goto error
71 strcompare params[2] "/v"
72 if result <> 0 goto error
73 strcompare params[3] "/I"
74 if result <> 0 goto error
75 strcompare params[4] "test2"
76 if result <> 0 goto error
77
78 goto end
79
80 :test3
81 ; ttpmacro.exe /I macrofile test3 /Vxx /ixx /V /i
82 ;
83 ; 以下の解釈とする
84 ; paramcnt: 6
85 ; param2: test3
86 ; param3: /Vxx
87 ; param4: /ixx
88 ; param5: /V
89 ; param6: /i
90 ;
91 if paramcnt <> 6 goto error
92 strcompare params[2] "test3"
93 if result <> 0 goto error
94 strcompare params[3] "/Vxx"
95 if result <> 0 goto error
96 strcompare params[4] "/ixx"
97 if result <> 0 goto error
98 strcompare params[5] "/V"
99 if result <> 0 goto error
100 strcompare params[6] "/i"
101 if result <> 0 goto error
102
103 goto end
104
105 :test4
106 ; ttpmacro.exe /i macrofile test4 /V /Vxx /ixx
107 ;
108 ; 以下の解釈とする
109 ; paramcnt: 5
110 ; param2: test4
111 ; param3: /V
112 ; param4: /Vxx
113 ; param5: /ixx
114 ;
115 if paramcnt <> 5 goto error
116 strcompare params[2] "test4"
117 if result <> 0 goto error
118 strcompare params[3] "/V"
119 if result <> 0 goto error
120 strcompare params[4] "/Vxx"
121 if result <> 0 goto error
122 strcompare params[5] "/ixx"
123 if result <> 0 goto error
124
125 goto end
126
127 :test5
128 ; 未実装
129 goto end
130
131 :test6
132 ; 未実装
133 goto end
134
135 :test7
136 ; 未実装
137 goto end
138
139 :test8
140 ; 未実装
141 goto end
142
143 :test9
144 ; 未実装
145 goto end
146
147 :error
148 setexitcode 1
149
150 :end
151 end

Properties

Name Value
svn:executable *

Back to OSDN">Back to OSDN
ViewVC Help
Powered by ViewVC 1.1.26