Add test case

This commit is contained in:
Freddie Akeroyd authored and Michael Davidsaver committed 2026-04-01 08:37:29 -07:00
1 parent fb09dc0df9
commit acf53d31ee
1 file changed
+21
+21
View File
@@ -61,6 +61,27 @@ static void macEnvScope(void)
checkMac(handle, "E", "15");
checkMac(handle, "F", NULL);
{
/* test worst case for short definitions
* https://github.com/epics-base/epics-base/pull/838
*/
macParseDefns(NULL, "1,3,5", &defines); /* smoke */
#define CASE(I,V) \
testOk(defines[I] && strcmp(defines[I], V)==0, "defines[%u] \"%s\" == \"" V "\"", I, defines[I])
CASE(0,"1");
testOk1(defines[1]==NULL);
CASE(2,"3");
testOk1(defines[3]==NULL);
CASE(4,"5");
testOk1(defines[5]==NULL);
testOk1(defines[6]==NULL);
#undef CASE
free(defines);
defines = NULL;
}
{
macPushScope(handle);