Type : CREATION_INTERNE
El script genera sus propios archivos de prueba (archivo .cmd) directamente en el código mediante un Data Step.
| 1 | %initScenario (i_desc=Test of _executeCmdFile.sas) |
| 1 | %let path = %sysfunc (pathname(WORK)); |
| 2 | DATA _null_; |
| 3 | file "&path./createfolder.cmd"; |
| 4 | put "&g_makedir. ""&path./TestFolder"""; |
| 5 | RUN; |
| 1 | %initTestcase(i_object=_executeCmdFile.sas, i_desc=check call of program) |
| 2 | |
| 3 | %_executeCmdFile(&path./createfolder.cmd); |
| 4 | |
| 5 | %endTestCall; |
| 1 | %assertEquals(i_expected=1, i_actual=%_existdir(&path./TestFolder), i_desc=Folder should exist) |
| 2 | %assertLog() |
| 3 | %endTestcase() |
| 4 | |
| 5 | %endScenario(); |