Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_getxengine.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mf_getxengine macro
4
5 <h4> SAS Macros </h4>
6 @li mf_getxengine.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9
10**/
11
12filename feng temp;
13
14%mp_assertscope(SNAPSHOT)
15%put scope check:%mf_getxengine(feng);
16%mp_assertscope(COMPARE,
17 desc=Checking that mf_getxengine does not leak scope,
18 outds=work.test_results
19)
20
21%mp_assert(
22 iftrue=(%mf_getxengine(feng)=TEMP),
23 desc=Checking that a temporary fileref reports the TEMP engine,
24 outds=work.test_results
25)
26
27/* the macro documentation says a missing fileref returns 0 - it returns a
28 blank, because the row exists in SASHELP.VEXTFL with an empty XENGINE */
29%mp_assert(
30 iftrue=(%length(%mf_getxengine(nosuchfref))=0),
31 desc=Checking that a fileref that is not assigned returns nothing,
32 outds=work.test_results
33)