Changeset 660
- Timestamp:
- Sep 7, 2003, 10:59:28 PM (22 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/emx/testcase/statshdr.cmd
-
Property cvs2svn:cvs-rev
changed from
1.1
to1.2
r659 r660 73 73 74 74 /* 75 * Do testing.75 * Do parsing. 76 76 */ 77 77 sOut = 'STDOUT'; … … 81 81 call lineout sOut, left('File', 24)||X2C('09')||left('Level', 16); 82 82 call lineout sOut, left('-', 24, '-')||X2C('09')||left('-', 16,'-'); 83 asTodos.0 = 0; 83 84 do i = 1 to asFiles.0 84 85 call statfile sOut, sInclude, asFiles.i; 85 86 end 86 87 call lineout sOut; 88 89 /* 90 * Print todos. 91 */ 92 say ''; 93 say 'TODOs:' 94 do i = 1 to asTodos.0 95 call lineout sOut, '-'||asTodos.i; 96 end 87 97 88 98 exit(asFailed.0); … … 96 106 * @param sFile The include file to test, full path. 97 107 */ 98 statfile: procedure expose asExcludes. 108 statfile: procedure expose asExcludes. asTodos. 99 109 parse arg sOut, sDir, sFile 100 110 sName = substr(sFile, length(sDir) + 2); 101 111 sLevel = '--'; 102 sRemark = '';103 sChanged = '';112 asRemarks.0 = 0; 113 asChanges.0 = 0; 104 114 if (isExcluded(sName)) then 105 115 do … … 108 118 end 109 119 110 iLine = 1; 111 do while (lines(sFile) & iLine < 200) 120 iLine = 0; 121 fComment = 0; 122 do while (lines(sFile) > 0) 112 123 sLine = strip(linein(sFile)); 113 if (left(sLine, 1) = '*' & pos('@@', sLine) > 0) then 124 iLine = iLine + 1; 125 126 if (pos('/'||'*', sLine) > 0) then 127 fComment = 1; 128 129 if (left(sLine, 3) = '/'||'*'||'*' & pos('@file', sLine) > 0) then 114 130 do 115 iPos = pos('@@', sLine); 116 sWord = word(substr(sLine, iPos + 2), 1); 117 if (sWord == 'level') then 118 sLevel = strip(substr(sLine, iPos + 2 + 5)); 119 else if (sWord == 'remark') then 120 sRemark = strip(substr(sLine, iPos + 2 + 6)); 121 else if (sWord == 'changed') then 122 sChanged = strip(substr(sLine, iPos + 2 + 7)); 131 sLine = strip(linein(sFile)); 132 sLevel = strip(strip(sLine, 'L', '*')); 123 133 end 124 iLine = iLine + 1; 125 end 126 134 else 135 do 136 do while (fComment &, 137 ( (left(space(sLine), 3) = '* @'), 138 | (left(space(sLine), 5) = '/'||'*'||'*'||' @')) ) 139 iPos = pos(' @', sLine); 140 sWord = word(substr(sLine, iPos + 2), 1); 141 sText = strip(substr(sLine, pos('@'sWord, sLine) + length(sWord) + 1)); 142 143 /* read following lines */ 144 do forever 145 if (pos('*'||'/', sLine) > 0) then 146 do 147 fComment = 0; 148 leave 149 end 150 sLine = strip(linein(sFile)); 151 iLine = iLine + 1; 152 if (strip(sLine) = '*'||'/') then 153 do 154 fComment = 0; 155 leave 156 end 157 if (left(sLine, 1) = '*' & pos(' @', sLine) > 0) then 158 leave; 159 160 sText = sText || ' ' || strip(strip(sLine, 'L', '*')); 161 end 162 if (right(sText, 2) = '*/') then 163 sText = strip(substr(sText, 1, length(sText) - 2)); 164 165 if (sWord = 'remark') then 166 do 167 i = asRemarks.0 + 1; 168 asRemarks.i = sText 169 asRemarks.0 = i; 170 end 171 else if (sWord = 'changed') then 172 do 173 i = asChanges.0 + 1; 174 asChanges.i = sText 175 asChanges.0 = i; 176 end 177 else if (sWord = 'todo') then 178 do 179 i = asTodos.0 + 1; 180 asTodos.i = sText; 181 asTodos.0 = i; 182 end 183 end 184 end 185 end 186 187 /* 188 * Produce output. 189 */ 127 190 call lineout sOut, left(sName, 24)||X2C('09')||left(sLevel, 16); 128 if (sRemark <> '') then 129 call lineout sOut, X2C('09')'remark: '||sRemark; 130 if (sChanged <> '') then 131 call lineout sOut, X2C('09')'changes by '||sChanged 191 do i = 1 to asRemarks.0 192 call lineout sOut, X2C('09')'remark: '||asRemarks.i; 193 end 194 195 do i = 1 to asChanges.0 196 if (pos(':', word(asChanges.i, 1)) > 0) then 197 call lineout sOut, X2C('09')'changes by '||asChanges.i 198 else 199 call lineout sOut, X2C('09')'changes: '||asChanges.i 200 end 132 201 return 0; 133 202 -
Property cvs2svn:cvs-rev
changed from
Note:
See TracChangeset
for help on using the changeset viewer.