12%mp_assertscope(SNAPSHOT)
13%put scope check:%mf_getuser();
14%mp_assertscope(COMPARE,
15 desc=Checking that mf_getuser does not leak scope,
16 outds=work.test_results
20 iftrue=(%length(%mf_getuser())>0),
21 desc=Checking that a user is always returned,
22 outds=work.test_results
25%
if %symexist(_sasjs_username) %then %
do;
27 iftrue=(%mf_getuser()=&_sasjs_username),
28 desc=Checking that the SASjs end user is preferred over the session account,
29 outds=work.test_results
32 iftrue=(%mf_getuser() ne &sysuserid),
33 desc=Checking that the session account is not reported as the user,
34 outds=work.test_results
39 iftrue=(%mf_getuser()=&sysuserid),
40 desc=Checking that the session account is reported with no end user present,
41 outds=work.test_results