Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mp_unzip.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mp_unzip macro
4
5 <h4> SAS Macros </h4>
6 @li mp_unzip.sas
7 @li mf_mkdir.sas
8 @li mp_assert.sas
9
10**/
11
12%let root=%sysfunc(pathname(work))/unzip_test;
13%mf_mkdir(&root)
14
15filename zref zip "&root/test.zip";
16
17data _null_;
18 file zref member="one.txt";
19 put 'zipped text';
20run;
21
22%mp_unzip(ziploc="&root/test.zip",outdir=&root/out)
23
24%mp_assert(
25 iftrue=(%sysfunc(fileexist(&root/out/one.txt))=1),
26 desc=Checking that the zip member is written to the output directory,
27 outds=work.test_results
28)