Skip to content

Commit

Permalink
embed/tests/test_api: add invalid load test case with error() in script
Browse files Browse the repository at this point in the history
  • Loading branch information
vsergeev committed Jul 29, 2016
1 parent cf84345 commit 286dda7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions embed/tests/test_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 286dda7

Please sign in to comment.