diff options
author | Donald Lee <dlqs@gmx.com> | 2021-08-10 00:29:19 +0200 |
---|---|---|
committer | Donald Lee <dlqs@gmx.com> | 2021-08-10 01:28:39 +0200 |
commit | 80bfe93670461bfc868c6252e2f15bd44586cd4e (patch) | |
tree | 519ee58966bd9296e2e20b46531fc9916fbfb60c /tests | |
parent | Merge pull request #9299 from donaldsharp/zebra_should_continue (diff) | |
download | frr-80bfe93670461bfc868c6252e2f15bd44586cd4e.tar.xz frr-80bfe93670461bfc868c6252e2f15bd44586cd4e.zip |
tests: Add test consecutive frrscript_call
Signed-off-by: Donald Lee <dlqs@gmx.com>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/lib/test_frrscript.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/tests/lib/test_frrscript.c b/tests/lib/test_frrscript.c index 7b2304597..4c5d8d292 100644 --- a/tests/lib/test_frrscript.c +++ b/tests/lib/test_frrscript.c @@ -62,6 +62,14 @@ int main(int argc, char **argv) long long *ansptr = frrscript_get_result(fs, "fact", "ans", lua_tointegerp); assert(*ansptr == 120); + + /* check consecutive call + get_result without re-loading */ + n = 4; + result = frrscript_call(fs, "fact", ("n", &n)); + assert(result == 0); + ansptr = frrscript_get_result(fs, "fact", "ans", lua_tointegerp); + assert(*ansptr == 24); + XFREE(MTYPE_SCRIPT_RES, ansptr); /* Negative testing */ |