Macros for SAS Application Developers
https://github.com/sasjs/core
Loading...
Searching...
No Matches
mf_getschema.test.sas
Go to the documentation of this file.
1/**
2 @file
3 @brief Testing mf_getschema macro
4
5 <h4> SAS Macros </h4>
6 @li mf_getschema.sas
7 @li mp_assert.sas
8 @li mp_assertscope.sas
9
10 @details A positive case needs a library whose engine publishes a schema
11 through SYSNAME (a database library). The base engine does not, so the
12 assertions here cover the two branches that can be reached without one: a
13 base library and a libref that is not assigned, both of which must return
14 nothing without raising an error.
15
16**/
17
18%mp_assertscope(SNAPSHOT)
19%put scope check:%mf_getschema(WORK);
20%mp_assertscope(COMPARE,
21 desc=Checking that mf_getschema does not leak scope,
22 outds=work.test_results
23)
24
25%mp_assert(
26 iftrue=(%length(%mf_getschema(WORK))=0),
27 desc=Checking that a base engine library returns no schema,
28 outds=work.test_results
29)
30
31%mp_assert(
32 iftrue=(%length(%mf_getschema(nosuchlib))=0),
33 desc=Checking that a library that is not assigned returns nothing,
34 outds=work.test_results
35)
36
37%mp_assert(
38 iftrue=(%length(%mf_getschema(sashelp.class))=0),
39 desc=Checking that a two level libds reference is accepted,
40 outds=work.test_results
41)