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);