Macros for SAS Application Developers
https://github.com/sasjs/core
mf_deletefile.test.sas
Go to the documentation of this file.
1 /**
2  @file
3  @brief Testing mf_deletefile.sas macro
4 
5  <h4> SAS Macros </h4>
6  @li mf_deletefile.sas
7  @li mf_writefile.sas
8  @li mp_assert.sas
9  @li mp_assertscope.sas
10 
11 **/
12 
13 %let test1file=&sasjswork/myfile1.txt;
14 
15 %mf_writefile(&test1file,l1=some content)
16 
17 %mp_assert(
18  iftrue=(%sysfunc(fileexist(&test1file))=1),
19  desc=Check &test1file exists
20 )
21 
22 %mp_assertscope(SNAPSHOT)
23 %mf_deletefile(&test1file)
24 %mp_assertscope(COMPARE)
25 
26 %mp_assert(
27  iftrue=(%sysfunc(fileexist(&test1file))=0),
28  desc=Check &test1file no longer exists
29 )