Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mv_deleteviyafolder.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mv_deleteviyafolder macro function
4
5 <h4> SAS Macros </h4>
6 @li mf_uid.sas
7 @li mfv_existfolder.sas
8 @li mp_assert.sas
9 @li mp_assertscope.sas
10 @li mv_createfolder.sas
11 @li mv_deleteviyafolder.sas
12
13**/
14
15options mprint sgen;
16
17%let folder=%mf_uid();
18%let tgtfolder=&mcTestAppLoc/temp/&folder;
19
20/* create a folder */
21%mv_createfolder(path=&tgtfolder)
22
23
24%mp_assert(
25 iftrue=(%mfv_existfolder(&tgtfolder)=1),
26 desc=Check if created folder exists
27)
28
29%mp_assertscope(SNAPSHOT)
30%mv_deleteviyafolder(path=&tgtfolder)
31/* ignore proc json vars */
32%mp_assertscope(COMPARE
33 ,ignorelist=MCLIB0_JADP1LEN MCLIB0_JADP2LEN MCLIB0_JADVLEN MCLIB2_JADP1LEN
34 MCLIB2_JADVLEN
35)
36
37%mp_assert(
38 iftrue=(%mfv_existfolder(&tgtfolder)=0),
39 desc=Check if deleted folder is gone
40)
41
42/* delete folder with content */
43%mv_createfolder(path=&tgtfolder/content/and/stuff)
44%mp_assert(
45 iftrue=(%mfv_existfolder(&tgtfolder/content/and/stuff)=1),
46 desc=Check if folder with content exists
47)
48%mv_deleteviyafolder(path=&tgtfolder)
49%mp_assert(
50 iftrue=(%mfv_existfolder(&tgtfolder)=0),
51 desc=Check if deleted folder with subfolders is gone
52)