mirror of
https://github.com/sasjs/core.git
synced 2026-01-09 10:20:06 +00:00
chore: test fixes
This commit is contained in:
@@ -6,6 +6,7 @@
|
|||||||
@li mf_uid.sas
|
@li mf_uid.sas
|
||||||
@li mfv_existfile.sas
|
@li mfv_existfile.sas
|
||||||
@li mp_assert.sas
|
@li mp_assert.sas
|
||||||
|
@li mp_assertscope.sas
|
||||||
@li mv_createfile.sas
|
@li mv_createfile.sas
|
||||||
|
|
||||||
|
|
||||||
@@ -21,7 +22,14 @@ data _null_;
|
|||||||
file somefile;
|
file somefile;
|
||||||
put 'hello testings';
|
put 'hello testings';
|
||||||
run;
|
run;
|
||||||
|
%mp_assertscope(SNAPSHOT)
|
||||||
%mv_createfile(path=&mcTestAppLoc/temp, name=&file..txt,inref=somefile,mdebug=1)
|
%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(
|
%mp_assert(
|
||||||
iftrue=(%mfv_existfile(&mcTestAppLoc/temp/&file..txt)=1),
|
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)
|
%mv_createfile(path=&mcTestAppLoc/temp, name=test4.sas,inref=f4,mdebug=1)
|
||||||
|
|
||||||
%mp_assert(
|
%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
|
desc=Check if created sas program exists
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
@@ -32,13 +32,17 @@
|
|||||||
msg=Cannot enter &sysmacroname with syscc=&syscc
|
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 fref=%mf_getuniquefileref();
|
||||||
%let name=%scan(&filepath,-1,/);
|
%let name=%scan(&filepath,-1,/);
|
||||||
%let path=%substr(&filepath,1,%length(&filepath)-%length(&name)-1);
|
%let path=%substr(&filepath,1,%length(&filepath)-%length(&name)-1);
|
||||||
|
|
||||||
%if %sysfunc(filename(fref,,filesrvc,folderPath="&path" filename="&name"))=0
|
%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;
|
%end;
|
||||||
%else %do;
|
%else %do;
|
||||||
%put &sysmacroname: did not find &filepath;
|
%put &sysmacroname: did not find &filepath;
|
||||||
|
|||||||
@@ -183,9 +183,8 @@ data &outds;
|
|||||||
end;
|
end;
|
||||||
run;
|
run;
|
||||||
|
|
||||||
%local mfv_getpathurivar=%mfv_getpathuri(&path/&name);
|
|
||||||
%put &sysmacroname: File &name successfully created:;%put;
|
%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 &base_uri/SASJobExecution?_file=&path/&name;%put;
|
||||||
%put &sysmacroname:;
|
%put &sysmacroname:;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user