Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_getplatform.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mf_getplatform macro
4
5 <h4> SAS Macros </h4>
6 @li mf_getplatform.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9
10**/
11
12%mp_assertscope(SNAPSHOT)
13%put scope check:%mf_getplatform();
14%mp_assertscope(COMPARE,
15 desc=Checking that mf_getplatform does not leak scope,
16 outds=work.test_results
17)
18
19%mp_assert(
20 iftrue=(%index(SASMETA SASVIYA SASJS BASESAS,%mf_getplatform())>0),
21 desc=Checking that one of the four documented platforms is returned,
22 outds=work.test_results
23)
24
25%mp_assert(
26 iftrue=(%length(%mf_getplatform())>0),
27 desc=Checking that a platform is always returned,
28 outds=work.test_results
29)
30
31/* the harness never runs inside a SAS Studio client */
32%mp_assert(
33 iftrue=(%mf_getplatform(switch=SASSTUDIO)=0),
34 desc=Checking that a non SAS Studio client reports version 0,
35 outds=work.test_results
36)
37
38%if %mf_getplatform() ne SASVIYA %then %do;
39 %mp_assert(
40 iftrue=(%length(%mf_getplatform(switch=VIYARESTAPI))=0),
41 desc=Checking that the Viya REST switch is empty away from Viya,
42 outds=work.test_results
43 )
44%end;