1
0
mirror of https://github.com/sasjs/core.git synced 2025-12-10 22:14:35 +00:00

chore: test fixes

This commit is contained in:
allan
2025-05-19 12:20:54 +01:00
parent 2de6fba5bb
commit 2ddded9600
3 changed files with 16 additions and 5 deletions

View File

@@ -6,6 +6,7 @@
@li mf_uid.sas
@li mfv_existfile.sas
@li mp_assert.sas
@li mp_assertscope.sas
@li mv_createfile.sas
@@ -21,7 +22,14 @@ data _null_;
file somefile;
put 'hello testings';
run;
%mp_assertscope(SNAPSHOT)
%mv_createfile(path=&mcTestAppLoc/temp, name=&file..txt,inref=somefile,mdebug=1)
%mp_assertscope(COMPARE
,ignorelist=MCLIB0_JADP1LEN MCLIB0_JADP2LEN MCLIB0_JADPNUM
MCLIB0_JADVLEN MCLIB2_JADP1LEN
SASJSPROCESSMODE SASJS_STPSRV_HEADER_LOC
MCLIB2_JADP2LEN MCLIB2_JADPNUM MCLIB2_JADVLEN
)
%mp_assert(
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/&file..txt)=1),
@@ -63,7 +71,7 @@ run;
%mv_createfile(path=&mcTestAppLoc/temp, name=test4.sas,inref=f4,mdebug=1)
%mp_assert(
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/&file..sas)=1),
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/test4.sas)=1),
desc=Check if created sas program exists
)

View File

@@ -32,13 +32,17 @@
msg=Cannot enter &sysmacroname with syscc=&syscc
)
%local fref rc path name;
%local fref rc path name var /* var is used to avoid delete timing issue */;
%let fref=%mf_getuniquefileref();
%let name=%scan(&filepath,-1,/);
%let path=%substr(&filepath,1,%length(&filepath)-%length(&name)-1);
%if %sysfunc(filename(fref,,filesrvc,folderPath="&path" filename="&name"))=0
%then %do;&&_FILESRVC_&fref._URI%let rc=%sysfunc(filename(fref));
%then %do;
%let var=_FILESRVC_&fref._URI;
%str(&&&var)
%let rc=%sysfunc(filename(fref));
%symdel &var;
%end;
%else %do;
%put &sysmacroname: did not find &filepath;

View File

@@ -183,9 +183,8 @@ data &outds;
end;
run;
%local mfv_getpathurivar=%mfv_getpathuri(&path/&name);
%put &sysmacroname: File &name successfully created:;%put;
%put &base_uri&mfv_getpathurivar;%put;
%put &base_uri%mfv_getpathuri(&path/&name);%put;
%put &base_uri/SASJobExecution?_file=&path/&name;%put;
%put &sysmacroname:;