| 1 |
;_____________________________________________________________________________ |
| 2 |
; |
| 3 |
; Word Functions Test |
| 4 |
;_____________________________________________________________________________ |
| 5 |
; |
| 6 |
; 2006 Shengalts Aleksander aka Instructor ([email protected]) |
| 7 |
|
| 8 |
Name "Word Functions Test" |
| 9 |
OutFile "WordFuncTest.exe" |
| 10 |
Caption "$(^Name)" |
| 11 |
ShowInstDetails show |
| 12 |
XPStyle on |
| 13 |
RequestExecutionLevel user |
| 14 |
|
| 15 |
Var FUNCTION |
| 16 |
Var OUT |
| 17 |
|
| 18 |
!include "WordFunc.nsh" |
| 19 |
|
| 20 |
;############### INSTALL ############### |
| 21 |
|
| 22 |
!define StackVerificationStart `!insertmacro StackVerificationStart` |
| 23 |
!macro StackVerificationStart _FUNCTION |
| 24 |
StrCpy $FUNCTION ${_FUNCTION} |
| 25 |
Call StackVerificationStart |
| 26 |
!macroend |
| 27 |
|
| 28 |
!define StackVerificationEnd `!insertmacro StackVerificationEnd` |
| 29 |
!macro StackVerificationEnd |
| 30 |
Call StackVerificationEnd |
| 31 |
!macroend |
| 32 |
|
| 33 |
Function StackVerificationStart |
| 34 |
StrCpy $0 !0 |
| 35 |
StrCpy $1 !1 |
| 36 |
StrCpy $2 !2 |
| 37 |
StrCpy $3 !3 |
| 38 |
StrCpy $4 !4 |
| 39 |
StrCpy $5 !5 |
| 40 |
StrCpy $6 !6 |
| 41 |
StrCpy $7 !7 |
| 42 |
StrCpy $8 !8 |
| 43 |
StrCpy $9 !9 |
| 44 |
StrCpy $R0 !R0 |
| 45 |
StrCpy $R1 !R1 |
| 46 |
StrCpy $R2 !R2 |
| 47 |
StrCpy $R3 !R3 |
| 48 |
StrCpy $R4 !R4 |
| 49 |
StrCpy $R5 !R5 |
| 50 |
StrCpy $R6 !R6 |
| 51 |
StrCpy $R7 !R7 |
| 52 |
StrCpy $R8 !R8 |
| 53 |
StrCpy $R9 !R9 |
| 54 |
FunctionEnd |
| 55 |
|
| 56 |
Function StackVerificationEnd |
| 57 |
IfErrors +3 |
| 58 |
DetailPrint 'PASSED $FUNCTION no errors' |
| 59 |
goto +2 |
| 60 |
DetailPrint 'FAILED $FUNCTION error' |
| 61 |
|
| 62 |
StrCmp $0 '!0' 0 error |
| 63 |
StrCmp $1 '!1' 0 error |
| 64 |
StrCmp $2 '!2' 0 error |
| 65 |
StrCmp $3 '!3' 0 error |
| 66 |
StrCmp $4 '!4' 0 error |
| 67 |
StrCmp $5 '!5' 0 error |
| 68 |
StrCmp $6 '!6' 0 error |
| 69 |
StrCmp $7 '!7' 0 error |
| 70 |
StrCmp $8 '!8' 0 error |
| 71 |
StrCmp $9 '!9' 0 error |
| 72 |
StrCmp $R0 '!R0' 0 error |
| 73 |
StrCmp $R1 '!R1' 0 error |
| 74 |
StrCmp $R2 '!R2' 0 error |
| 75 |
StrCmp $R3 '!R3' 0 error |
| 76 |
StrCmp $R4 '!R4' 0 error |
| 77 |
StrCmp $R5 '!R5' 0 error |
| 78 |
StrCmp $R6 '!R6' 0 error |
| 79 |
StrCmp $R7 '!R7' 0 error |
| 80 |
StrCmp $R8 '!R8' 0 error |
| 81 |
StrCmp $R9 '!R9' 0 error |
| 82 |
DetailPrint 'PASSED $FUNCTION stack' |
| 83 |
goto end |
| 84 |
|
| 85 |
error: |
| 86 |
DetailPrint 'FAILED $FUNCTION stack' |
| 87 |
; MessageBox MB_OKCANCEL '$$0={$0}$\n$$1={$1}$\n$$2={$2}$\n$$3={$3}$\n$$4={$4}$\n$$5={$5}$\n$$6={$6}$\n$$7={$7}$\n$$8={$8}$\n$$9={$9}$\n$$R0={$R0}$\n$$R1={$R1}$\n$$R2={$R2}$\n$$R3={$R3}$\n$$R4={$R4}$\n$$R5={$R5}$\n$$R6={$R6}$\n$$R7={$R7}$\n$$R8={$R8}$\n$$R9={$R9}' IDOK +2 |
| 88 |
; quit |
| 89 |
|
| 90 |
end: |
| 91 |
FunctionEnd |
| 92 |
|
| 93 |
|
| 94 |
|
| 95 |
Section WordFind |
| 96 |
${StackVerificationStart} WordFind |
| 97 |
|
| 98 |
${WordFind} '||io.sys|||Program Files|||WINDOWS' '||' '-02' $OUT |
| 99 |
StrCmp $OUT '|Program Files' 0 error |
| 100 |
|
| 101 |
${WordFind} '||io.sys||||Program Files||||WINDOWS' '||' '-2' $OUT |
| 102 |
StrCmp $OUT 'Program Files' 0 error |
| 103 |
|
| 104 |
${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '-2}' $OUT |
| 105 |
StrCmp $OUT '|logo.sys|||WINDOWS' 0 error |
| 106 |
|
| 107 |
${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '#' $OUT |
| 108 |
StrCmp $OUT '3' 0 error |
| 109 |
|
| 110 |
${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '*' $OUT |
| 111 |
StrCmp $OUT '2' 0 error |
| 112 |
|
| 113 |
${WordFind} 'C:\io.sys|||Program Files|||WINDOWS' '||' '/|Program Files' $OUT |
| 114 |
StrCmp $OUT '2' 0 error |
| 115 |
|
| 116 |
${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '+2}}' $OUT |
| 117 |
StrCmp $OUT '|||WINDOWS' 0 error |
| 118 |
|
| 119 |
${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '+2{}' $OUT |
| 120 |
StrCmp $OUT 'C:\io.sys|||WINDOWS' 0 error |
| 121 |
|
| 122 |
${WordFind} 'C:\io.sys|||logo.sys|||WINDOWS' '||' '+2*}' $OUT |
| 123 |
StrCmp $OUT '|logo.sys|||WINDOWS' 0 error |
| 124 |
|
| 125 |
${WordFind} 'C:\\Program Files\\NSIS\\NSIS.chm' '\' '-2{*' $OUT |
| 126 |
StrCmp $OUT 'C:\\Program Files\\NSIS' 0 error |
| 127 |
|
| 128 |
${WordFind} 'C:\io.sys|||Program Files|||WINDOWS|||' '||' '-1' $OUT |
| 129 |
StrCmp $OUT '|' 0 error |
| 130 |
|
| 131 |
${WordFind} '||C:\io.sys|||logo.sys|||WINDOWS||' '||' '-1}' $OUT |
| 132 |
StrCmp $OUT '' 0 error |
| 133 |
|
| 134 |
${WordFind} '||C:\io.sys|||logo.sys|||WINDOWS||' '||' '+1{' $OUT |
| 135 |
StrCmp $OUT '' 0 error |
| 136 |
|
| 137 |
${WordFind} 'C:\io.sys|||logo.sys' '_' 'E+1' $OUT |
| 138 |
IfErrors 0 error |
| 139 |
StrCmp $OUT 1 0 error |
| 140 |
|
| 141 |
${WordFind} 'C:\io.sys|||logo.sys|||' '\' 'E+3' $OUT |
| 142 |
IfErrors 0 error |
| 143 |
StrCmp $OUT 2 0 error |
| 144 |
|
| 145 |
${WordFind} 'C:\io.sys|||logo.sys' '\' 'E1' $OUT |
| 146 |
IfErrors 0 error |
| 147 |
StrCmp $OUT 3 0 error |
| 148 |
|
| 149 |
goto +2 |
| 150 |
error: |
| 151 |
SetErrors |
| 152 |
|
| 153 |
${StackVerificationEnd} |
| 154 |
SectionEnd |
| 155 |
|
| 156 |
|
| 157 |
Section WordFindS |
| 158 |
${StackVerificationStart} WordFindS |
| 159 |
|
| 160 |
${WordFindS} 'C:\io.sys|||Program Files|||WINDOWS' '||' '/|PROGRAM FILES' $OUT |
| 161 |
StrCmp $OUT 'C:\io.sys|||Program Files|||WINDOWS' 0 error |
| 162 |
|
| 163 |
${WordFindS} 'C:\io.sys|||Program Files|||WINDOWS' '||' '/|Program Files' $OUT |
| 164 |
StrCmp $OUT '2' 0 error |
| 165 |
|
| 166 |
goto +2 |
| 167 |
error: |
| 168 |
SetErrors |
| 169 |
|
| 170 |
${StackVerificationEnd} |
| 171 |
SectionEnd |
| 172 |
|
| 173 |
|
| 174 |
Section WordFind2X |
| 175 |
${StackVerificationStart} WordFind2X |
| 176 |
|
| 177 |
${WordFind2X} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT |
| 178 |
StrCmp $OUT 'logo.sys' 0 error |
| 179 |
|
| 180 |
${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '-1' $OUT |
| 181 |
StrCmp $OUT 'logo' 0 error |
| 182 |
|
| 183 |
${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '-1{{' $OUT |
| 184 |
StrCmp $OUT 'C:\WINDOWS C:\io.sys C:' 0 error |
| 185 |
|
| 186 |
${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '-1{}' $OUT |
| 187 |
StrCmp $OUT 'C:\WINDOWS C:\io.sys C:sys' 0 error |
| 188 |
|
| 189 |
${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '-1{*' $OUT |
| 190 |
StrCmp $OUT 'C:\WINDOWS C:\io.sys C:\logo.' 0 error |
| 191 |
|
| 192 |
${WordFind2X} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '/logo' $OUT |
| 193 |
StrCmp $OUT '2' 0 error |
| 194 |
|
| 195 |
${WordFind2X} '||a||b||c' '||' '||' 'E+1' $OUT |
| 196 |
StrCmp $OUT 'a' 0 error |
| 197 |
|
| 198 |
${WordFind2X} '[io.sys];[C:\logo.sys]' '\' '];' 'E+1' $OUT |
| 199 |
IfErrors 0 error |
| 200 |
StrCmp $OUT 1 0 error |
| 201 |
|
| 202 |
${WordFind2X} '[io.sys];[C:\logo.sys]' '[' '];' 'E+2' $OUT |
| 203 |
IfErrors 0 error |
| 204 |
StrCmp $OUT 2 0 error |
| 205 |
|
| 206 |
${WordFind2X} '[io.sys];[C:\logo.sys]' '\' '];' 'E2' $OUT |
| 207 |
IfErrors 0 error |
| 208 |
StrCmp $OUT 3 0 error |
| 209 |
|
| 210 |
goto +2 |
| 211 |
error: |
| 212 |
SetErrors |
| 213 |
|
| 214 |
${StackVerificationEnd} |
| 215 |
SectionEnd |
| 216 |
|
| 217 |
|
| 218 |
Section WordFind2XS |
| 219 |
${StackVerificationStart} WordFind2XS |
| 220 |
|
| 221 |
${WordFind2XS} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '/LOGO' $OUT |
| 222 |
StrCmp $OUT 'C:\WINDOWS C:\io.sys C:\logo.sys' 0 error |
| 223 |
|
| 224 |
${WordFind2XS} 'C:\WINDOWS C:\io.sys C:\logo.sys' '\' '.' '/logo' $OUT |
| 225 |
StrCmp $OUT '2' 0 error |
| 226 |
|
| 227 |
goto +2 |
| 228 |
error: |
| 229 |
SetErrors |
| 230 |
|
| 231 |
${StackVerificationEnd} |
| 232 |
SectionEnd |
| 233 |
|
| 234 |
|
| 235 |
Section WordFind3X |
| 236 |
${StackVerificationStart} WordFind3X |
| 237 |
|
| 238 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT |
| 239 |
StrCmp $OUT '1.AAB' 0 error |
| 240 |
|
| 241 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '-1' $OUT |
| 242 |
StrCmp $OUT '2.BAA' 0 error |
| 243 |
|
| 244 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '-1{{' $OUT |
| 245 |
StrCmp $OUT '[1.AAB];' 0 error |
| 246 |
|
| 247 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '-1{}' $OUT |
| 248 |
StrCmp $OUT '[1.AAB];[3.BBB];' 0 error |
| 249 |
|
| 250 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '-1{*' $OUT |
| 251 |
StrCmp $OUT '[1.AAB];[2.BAA];' 0 error |
| 252 |
|
| 253 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '/2.BAA' $OUT |
| 254 |
StrCmp $OUT '2' 0 error |
| 255 |
|
| 256 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'XX' '];' 'E+1' $OUT |
| 257 |
IfErrors 0 error |
| 258 |
StrCmp $OUT '1' 0 error |
| 259 |
|
| 260 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' 'E+3' $OUT |
| 261 |
IfErrors 0 error |
| 262 |
StrCmp $OUT '2' 0 error |
| 263 |
|
| 264 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' 'E3' $OUT |
| 265 |
IfErrors 0 error |
| 266 |
StrCmp $OUT '3' 0 error |
| 267 |
|
| 268 |
goto +2 |
| 269 |
error: |
| 270 |
SetErrors |
| 271 |
|
| 272 |
${StackVerificationEnd} |
| 273 |
SectionEnd |
| 274 |
|
| 275 |
|
| 276 |
Section WordFind3XS |
| 277 |
${StackVerificationStart} WordFind3XS |
| 278 |
|
| 279 |
${WordFind3XS} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '/2.baa' $OUT |
| 280 |
StrCmp $OUT '[1.AAB];[2.BAA];[3.BBB];' 0 error |
| 281 |
|
| 282 |
${WordFind3XS} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '/2.BAA' $OUT |
| 283 |
StrCmp $OUT '2' 0 error |
| 284 |
|
| 285 |
goto +2 |
| 286 |
error: |
| 287 |
SetErrors |
| 288 |
|
| 289 |
${StackVerificationEnd} |
| 290 |
SectionEnd |
| 291 |
|
| 292 |
|
| 293 |
Section WordReplace |
| 294 |
${StackVerificationStart} WordReplace |
| 295 |
|
| 296 |
${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT |
| 297 |
StrCmp $OUT 'C:\io.sys C:\logo.bmp C:\WINDOWS' 0 error |
| 298 |
|
| 299 |
${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' '' '+' $OUT |
| 300 |
StrCmp $OUT 'C:\io. C:\logo. C:\WINDOWS' 0 error |
| 301 |
|
| 302 |
${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'C:\io.sys' '' '+' $OUT |
| 303 |
StrCmp $OUT ' C:\logo.sys C:\WINDOWS' 0 error |
| 304 |
|
| 305 |
${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' ' ' ' ' '+1*' $OUT |
| 306 |
StrCmp $OUT 'C:\io.sys C:\logo.sys C:\WINDOWS' 0 error |
| 307 |
|
| 308 |
${WordReplace} 'C:\io.sys C:\logo.sysSYSsys C:\WINDOWS' 'sys' 'bmp' '+*' $OUT |
| 309 |
StrCmp $OUT 'C:\io.bmp C:\logo.bmp C:\WINDOWS' 0 error |
| 310 |
|
| 311 |
${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{' $OUT |
| 312 |
StrCmp $OUT '||C:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 0 error |
| 313 |
|
| 314 |
${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '}' $OUT |
| 315 |
StrCmp $OUT 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWS|||' 0 error |
| 316 |
|
| 317 |
${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{}' $OUT |
| 318 |
StrCmp $OUT '||C:\io.sys C:\logo.sys C:\WINDOWS|||' 0 error |
| 319 |
|
| 320 |
${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{*' $OUT |
| 321 |
StrCmp $OUT '|C:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 0 error |
| 322 |
|
| 323 |
${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '}*' $OUT |
| 324 |
StrCmp $OUT 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWS|' 0 error |
| 325 |
|
| 326 |
${WordReplace} 'SYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{}*' $OUT |
| 327 |
StrCmp $OUT '|C:\io.sys C:\logo.sys C:\WINDOWS|' 0 error |
| 328 |
|
| 329 |
${WordReplace} 'sysSYSsysC:\io.sys C:\logo.sys C:\WINDOWSsysSYSsys' 'sys' '|' '{}*' $OUT |
| 330 |
StrCmp $OUT '|C:\io.sys C:\logo.sys C:\WINDOWS|' 0 error |
| 331 |
|
| 332 |
${WordReplace} 'C:\io.sys C:\logo.sys' '#sys' '|sys|' 'E+1' $OUT |
| 333 |
IfErrors 0 error |
| 334 |
StrCmp $OUT '1' 0 error |
| 335 |
|
| 336 |
${WordReplace} 'C:\io.sys C:\logo.sys' '.sys' '|sys|' 'E+3' $OUT |
| 337 |
IfErrors 0 error |
| 338 |
StrCmp $OUT '2' 0 error |
| 339 |
|
| 340 |
${WordReplace} 'C:\io.sys C:\logo.sys' '.sys' '|sys|' 'E3' $OUT |
| 341 |
IfErrors 0 error |
| 342 |
StrCmp $OUT '3' 0 error |
| 343 |
|
| 344 |
goto +2 |
| 345 |
error: |
| 346 |
SetErrors |
| 347 |
|
| 348 |
${StackVerificationEnd} |
| 349 |
SectionEnd |
| 350 |
|
| 351 |
|
| 352 |
Section WordReplaceS |
| 353 |
${StackVerificationStart} WordReplaceS |
| 354 |
|
| 355 |
${WordReplaceS} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT |
| 356 |
StrCmp $OUT 'C:\io.sys C:\logo.sys C:\WINDOWS' 0 error |
| 357 |
|
| 358 |
${WordReplaceS} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'sys' 'bmp' '+2' $OUT |
| 359 |
StrCmp $OUT 'C:\io.sys C:\logo.bmp C:\WINDOWS' 0 error |
| 360 |
|
| 361 |
goto +2 |
| 362 |
error: |
| 363 |
SetErrors |
| 364 |
|
| 365 |
${StackVerificationEnd} |
| 366 |
SectionEnd |
| 367 |
|
| 368 |
|
| 369 |
Section WordAdd |
| 370 |
${StackVerificationStart} WordAdd |
| 371 |
|
| 372 |
${WordAdd} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT |
| 373 |
StrCmp $OUT 'C:\io.sys C:\WINDOWS C:\config.sys' 0 error |
| 374 |
|
| 375 |
${WordAdd} 'C:\io.sys C:\logo.sys C:\WINDOWS' ' ' '-C:\WINDOWS C:\config.sys C:\IO.SYS' $OUT |
| 376 |
StrCmp $OUT 'C:\logo.sys' 0 error |
| 377 |
|
| 378 |
${WordAdd} 'C:\io.sys' ' ' '+C:\WINDOWS C:\config.sys C:\IO.SYS' $OUT |
| 379 |
StrCmp $OUT 'C:\io.sys C:\WINDOWS C:\config.sys' 0 error |
| 380 |
|
| 381 |
${WordAdd} 'C:\io.sys C:\logo.sys C:\WINDOWS' ' ' '-C:\WINDOWS' $OUT |
| 382 |
StrCmp $OUT 'C:\io.sys C:\logo.sys' 0 error |
| 383 |
|
| 384 |
${WordAdd} 'C:\io.sys C:\logo.sys' ' ' '+C:\logo.sys' $OUT |
| 385 |
StrCmp $OUT 'C:\io.sys C:\logo.sys' 0 error |
| 386 |
|
| 387 |
${WordAdd} 'C:\io.sys C:\logo.sys' ' ' 'E-' $OUT |
| 388 |
StrCmp $OUT 'C:\io.sys C:\logo.sys' 0 error |
| 389 |
IfErrors error |
| 390 |
|
| 391 |
${WordAdd} 'C:\io.sys C:\logo.sys' '' 'E-C:\logo.sys' $OUT |
| 392 |
IfErrors 0 error |
| 393 |
StrCmp $OUT '1' 0 error |
| 394 |
|
| 395 |
${WordAdd} 'C:\io.sys C:\logo.sys' '' 'EC:\logo.sys' $OUT |
| 396 |
IfErrors 0 error |
| 397 |
StrCmp $OUT '3' 0 error |
| 398 |
|
| 399 |
goto +2 |
| 400 |
error: |
| 401 |
SetErrors |
| 402 |
|
| 403 |
${StackVerificationEnd} |
| 404 |
SectionEnd |
| 405 |
|
| 406 |
|
| 407 |
Section WordAddS |
| 408 |
${StackVerificationStart} WordAddS |
| 409 |
|
| 410 |
${WordAddS} 'C:\io.sys C:\WINDOWS' ' ' '+C:\windows C:\config.sys' $OUT |
| 411 |
StrCmp $OUT 'C:\io.sys C:\WINDOWS C:\windows C:\config.sys' 0 error |
| 412 |
|
| 413 |
${WordAddS} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT |
| 414 |
StrCmp $OUT 'C:\io.sys C:\WINDOWS C:\config.sys' 0 error |
| 415 |
|
| 416 |
goto +2 |
| 417 |
error: |
| 418 |
SetErrors |
| 419 |
|
| 420 |
${StackVerificationEnd} |
| 421 |
SectionEnd |
| 422 |
|
| 423 |
|
| 424 |
Section WordInsert |
| 425 |
${StackVerificationStart} WordInsert |
| 426 |
|
| 427 |
${WordInsert} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT |
| 428 |
StrCmp $OUT 'C:\io.sys C:\logo.sys C:\WINDOWS' 0 error |
| 429 |
|
| 430 |
${WordInsert} 'C:\io.sys' ' ' 'C:\WINDOWS' '+2' $OUT |
| 431 |
StrCmp $OUT 'C:\io.sys C:\WINDOWS' 0 error |
| 432 |
|
| 433 |
${WordInsert} '' ' ' 'C:\WINDOWS' '+1' $OUT |
| 434 |
StrCmp $OUT 'C:\WINDOWS ' 0 error |
| 435 |
|
| 436 |
${WordInsert} 'C:\io.sys C:\logo.sys' '' 'C:\logo.sys' 'E+1' $OUT |
| 437 |
IfErrors 0 error |
| 438 |
StrCmp $OUT '1' 0 error |
| 439 |
|
| 440 |
${WordInsert} 'C:\io.sys C:\logo.sys' ' ' 'C:\logo.sys' 'E+4' $OUT |
| 441 |
IfErrors 0 error |
| 442 |
StrCmp $OUT '2' 0 error |
| 443 |
|
| 444 |
${WordInsert} 'C:\io.sys C:\logo.sys' '' 'C:\logo.sys' 'E1' $OUT |
| 445 |
IfErrors 0 error |
| 446 |
StrCmp $OUT '3' 0 error |
| 447 |
|
| 448 |
goto +2 |
| 449 |
error: |
| 450 |
SetErrors |
| 451 |
|
| 452 |
${StackVerificationEnd} |
| 453 |
SectionEnd |
| 454 |
|
| 455 |
|
| 456 |
Section WordInsertS |
| 457 |
${StackVerificationStart} WordInsertS |
| 458 |
|
| 459 |
${WordInsertS} 'C:\io.sys x C:\logo.sys' ' X ' 'C:\NTLDR' '+2' $OUT |
| 460 |
StrCmp $OUT 'C:\io.sys x C:\logo.sys X C:\NTLDR' 0 error |
| 461 |
|
| 462 |
${WordInsertS} 'C:\io.sys x C:\logo.sys' ' x ' 'C:\NTLDR' '+2' $OUT |
| 463 |
StrCmp $OUT 'C:\io.sys x C:\NTLDR x C:\logo.sys' 0 error |
| 464 |
|
| 465 |
goto +2 |
| 466 |
error: |
| 467 |
SetErrors |
| 468 |
|
| 469 |
${StackVerificationEnd} |
| 470 |
SectionEnd |
| 471 |
|
| 472 |
|
| 473 |
Section StrFilter |
| 474 |
${StackVerificationStart} StrFilter |
| 475 |
|
| 476 |
${StrFilter} '123abc 456DEF 7890|%#' '+' '' '' $OUT |
| 477 |
IfErrors error |
| 478 |
StrCmp $OUT '123ABC 456DEF 7890|%#' 0 error |
| 479 |
|
| 480 |
${StrFilter} '123abc 456DEF 7890|%#' '-' 'ef' '' $OUT |
| 481 |
IfErrors error |
| 482 |
StrCmp $OUT '123abc 456dEF 7890|%#' 0 error |
| 483 |
|
| 484 |
${StrFilter} '123abc 456DEF 7890|%#' '2' '|%' '' $OUT |
| 485 |
IfErrors error |
| 486 |
StrCmp $OUT 'abcDEF|%' 0 error |
| 487 |
|
| 488 |
${StrFilter} '123abc 456DEF 7890|%#' '13' 'af' '4590' $OUT |
| 489 |
IfErrors error |
| 490 |
StrCmp $OUT '123a 6F 78|%#' 0 error |
| 491 |
|
| 492 |
${StrFilter} '123abc 456DEF 7890|%#' '+12' 'b' 'def' $OUT |
| 493 |
IfErrors error |
| 494 |
StrCmp $OUT '123AbC4567890' 0 error |
| 495 |
|
| 496 |
${StrFilter} '123abc 456DEF 7890|%#' '+12' 'b' 'def' $OUT |
| 497 |
IfErrors error |
| 498 |
StrCmp $OUT '123AbC4567890' 0 error |
| 499 |
|
| 500 |
${StrFilter} '123abc 456DEF 7890|%#' '123' 'b' 'def' $OUT |
| 501 |
IfErrors 0 error |
| 502 |
|
| 503 |
goto +2 |
| 504 |
error: |
| 505 |
SetErrors |
| 506 |
|
| 507 |
${StackVerificationEnd} |
| 508 |
SectionEnd |
| 509 |
|
| 510 |
|
| 511 |
Section StrFilterS |
| 512 |
${StackVerificationStart} StrFilterS |
| 513 |
|
| 514 |
${StrFilterS} '123abc 456DEF 7890|%#' '13' 'af' '4590' $OUT |
| 515 |
IfErrors error |
| 516 |
StrCmp $OUT '123a 6 78|%#' 0 error |
| 517 |
|
| 518 |
goto +2 |
| 519 |
error: |
| 520 |
SetErrors |
| 521 |
|
| 522 |
${StackVerificationEnd} |
| 523 |
SectionEnd |
| 524 |
|
| 525 |
|
| 526 |
Section VersionCompare |
| 527 |
${StackVerificationStart} VersionCompare |
| 528 |
|
| 529 |
${VersionCompare} '1.1.1.9' '1.1.1.01' $OUT |
| 530 |
StrCmp $OUT '1' 0 error |
| 531 |
|
| 532 |
${VersionCompare} '1.1.1.1' '1.1.1.10' $OUT |
| 533 |
StrCmp $OUT '2' 0 error |
| 534 |
|
| 535 |
${VersionCompare} '91.1.1.1' '101.1.1.9' $OUT |
| 536 |
StrCmp $OUT '2' 0 error |
| 537 |
|
| 538 |
${VersionCompare} '1.1.1.1' '1.1.1.1' $OUT |
| 539 |
StrCmp $OUT '0' 0 error |
| 540 |
|
| 541 |
${VersionCompare} '1.1.1.9' '1.1.1.10' $OUT |
| 542 |
StrCmp $OUT '2' 0 error |
| 543 |
|
| 544 |
${VersionCompare} '1.1.1.0' '1.1.1' $OUT |
| 545 |
StrCmp $OUT '0' 0 error |
| 546 |
|
| 547 |
${VersionCompare} '1.1.0.0' '1.1' $OUT |
| 548 |
StrCmp $OUT '0' 0 error |
| 549 |
|
| 550 |
goto +2 |
| 551 |
error: |
| 552 |
SetErrors |
| 553 |
|
| 554 |
${StackVerificationEnd} |
| 555 |
SectionEnd |
| 556 |
|
| 557 |
|
| 558 |
Section VersionConvert |
| 559 |
${StackVerificationStart} VersionConvert |
| 560 |
|
| 561 |
${VersionConvert} '9.0a' '' $OUT |
| 562 |
StrCmp $OUT '9.0.01' 0 error |
| 563 |
|
| 564 |
${VersionConvert} '9.0c' '' $OUT |
| 565 |
StrCmp $OUT '9.0.03' 0 error |
| 566 |
|
| 567 |
${VersionConvert} '0.15c-9m' '' $OUT |
| 568 |
StrCmp $OUT '0.15.03.9.13' 0 error |
| 569 |
|
| 570 |
${VersionConvert} '0.15c+' 'abcdefghijklmnopqrstuvwxyz+' $OUT |
| 571 |
StrCmp $OUT '0.15.0327' 0 error |
| 572 |
|
| 573 |
${VersionConvert} '0.0xa12.x.ax|.|.|x|a|.3|a.4.||5.|' '' $OUT |
| 574 |
StrCmp $OUT '0.0.2401.12.24.0124.24.01.3.01.4.5' 0 error |
| 575 |
|
| 576 |
goto +2 |
| 577 |
error: |
| 578 |
SetErrors |
| 579 |
|
| 580 |
${StackVerificationEnd} |
| 581 |
SectionEnd |
| 582 |
|
| 583 |
|
| 584 |
Section WriteUninstaller |
| 585 |
goto +2 |
| 586 |
WriteUninstaller '$EXEDIR\un.WordFuncTest.exe' |
| 587 |
SectionEnd |
| 588 |
|
| 589 |
|
| 590 |
|
| 591 |
;############### UNINSTALL ############### |
| 592 |
|
| 593 |
Section un.Uninstall |
| 594 |
${WordFind} 'C:\io.sys C:\Program Files C:\WINDOWS' ' C:\' '-02' $OUT |
| 595 |
${WordFindS} 'C:\io.sys C:\Program Files C:\WINDOWS' ' C:\' '-02' $OUT |
| 596 |
${WordFind2X} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT |
| 597 |
${WordFind2XS} '[C:\io.sys];[C:\logo.sys];[C:\WINDOWS]' '[C:\' '];' '+2' $OUT |
| 598 |
${WordFind3X} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT |
| 599 |
${WordFind3XS} '[1.AAB];[2.BAA];[3.BBB];' '[' 'AA' '];' '+1' $OUT |
| 600 |
${WordReplace} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT |
| 601 |
${WordReplaceS} 'C:\io.sys C:\logo.sys C:\WINDOWS' 'SYS' 'bmp' '+2' $OUT |
| 602 |
${WordAdd} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT |
| 603 |
${WordAddS} 'C:\io.sys C:\WINDOWS' ' ' '+C:\WINDOWS C:\config.sys' $OUT |
| 604 |
${WordInsert} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT |
| 605 |
${WordInsertS} 'C:\io.sys C:\WINDOWS' ' ' 'C:\logo.sys' '-2' $OUT |
| 606 |
${StrFilter} '123abc 456DEF 7890|%#' '+' '' '' $OUT |
| 607 |
${StrFilterS} '123abc 456DEF 7890|%#' '+' '' '' $OUT |
| 608 |
${VersionCompare} '1.1.1.9' '1.1.1.01' $OUT |
| 609 |
${VersionConvert} '9.0a' '' $OUT |
| 610 |
SectionEnd |