From 286dda7a4271e65550aaac5116f727176c691692 Mon Sep 17 00:00:00 2001 From: Vanya Sergeev Date: Wed, 27 Jul 2016 01:00:18 -0700 Subject: [PATCH] embed/tests/test_api: add invalid load test case with error() in script --- embed/tests/test_api.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/embed/tests/test_api.c b/embed/tests/test_api.c index 754f153c2..b72a1d3a1 100644 --- a/embed/tests/test_api.c +++ b/embed/tests/test_api.c @@ -38,6 +38,10 @@ void test_load(void) { /* Create context */ passert((radio = luaradio_new()) != NULL); + /* Test invalid load: error in script */ + passert(luaradio_load(radio, "error('foobar')") < 0); + passert(luaradio_start(radio) < 0); + /* Test invalid load: no object returned */ passert(luaradio_load(radio, "x = 5") < 0); passert(luaradio_start(radio) < 0);