mirror of
https://github.com/sasjs/core.git
synced 2025-12-11 06:24:35 +00:00
feat: adding mfv_existfile.sas and tests
This commit is contained in:
34
tests/viya/mfv_existfile.test.sas
Normal file
34
tests/viya/mfv_existfile.test.sas
Normal file
@@ -0,0 +1,34 @@
|
||||
/**
|
||||
@file
|
||||
@brief Testing mfv_existfile macro function
|
||||
|
||||
<h4> SAS Macros </h4>
|
||||
@li mf_uid.sas
|
||||
@li mfv_existfile.sas
|
||||
@li mp_assert.sas
|
||||
@li mv_createfile.sas
|
||||
|
||||
**/
|
||||
|
||||
options mprint sgen;
|
||||
|
||||
%let file=%mf_uid();
|
||||
|
||||
/* create a folder */
|
||||
filename somefile temp;
|
||||
data _null_;
|
||||
file somefile;
|
||||
put 'hello testings';
|
||||
run;
|
||||
%mv_createfile(path=&mcTestAppLoc/temp, name=&file..txt,inref=somefile)
|
||||
|
||||
|
||||
%mp_assert(
|
||||
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/&file..txt)=1),
|
||||
desc=Check if created file exists
|
||||
)
|
||||
|
||||
%mp_assert(
|
||||
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/%mf_uid().txt)=0),
|
||||
desc=Check if non created file does not exist
|
||||
)
|
||||
Reference in New Issue
Block a user