1
0
mirror of https://github.com/sasjs/core.git synced 2026-01-04 16:10:06 +00:00

fix: ensuring mp_hashdirectory will output an empty dataset when the target directory does not exist. Updated tests and documentation also

This commit is contained in:
Allan Bowe
2022-10-27 20:38:41 +00:00
parent 5b251006cd
commit ef574f6319
5 changed files with 141 additions and 11 deletions

View File

@@ -131,3 +131,19 @@ data _null_;
set work.hashes2;
put file_hash file_path;
run;
/* check that it works when the target directory is missing */
%mp_hashdirectory(&fpath/doesnotexist,outds=work.hashes3,maxdepth=MAX)
%mp_assert(
iftrue=(&syscc=0),
desc=No errors when directory is missing,
outds=work.test_results
)
%mp_assert(
iftrue=(%mf_nobs(work.hashes3)=0),
desc=no records created when directory is missing,
outds=work.test_results
)