Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_loc.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mf_loc macro
4
5 <h4> SAS Macros </h4>
6 @li mf_loc.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9
10**/
11
12%mp_assertscope(SNAPSHOT)
13%put scope check:%mf_loc(VIYACONFIG);
14%mp_assertscope(COMPARE,
15 desc=Checking that mf_loc does not leak scope,
16 outds=work.test_results
17)
18
19%mp_assert(
20 iftrue=(%index(%mf_loc(VIYACONFIG),/opt/sas/viya/config)=1),
21 desc=Checking that the Viya configuration path is returned for VIYACONFIG,
22 outds=work.test_results
23)
24
25%mp_assert(
26 iftrue=(%index(%mf_loc(POF),SASPlatformObjectFramework)>0),
27 desc=Checking that the platform object framework is located for POF,
28 outds=work.test_results
29)
30
31%mp_assert(
32 iftrue=(%index(%mf_loc(PLATFORMOBJECTFRAMEWORK),SASPlatform)>0),
33 desc=Checking that the long form of POF is accepted,
34 outds=work.test_results
35)
36
37%mp_assert(
38 iftrue=(%length(%mf_loc(NOSUCHITEM))=0),
39 desc=Checking that an item the macro cannot locate returns nothing,
40 outds=work.test_results
41)