lua: fix memory leak in set method
[project/uci.git] / tests / cram / test_ucilua_testcases.t
1 set LUA_CPATH and ucilua for convenience:
2
3 $ [ -n "$UCI_LUA" ] && export LUA_CPATH="$(dirname "$UCI_LUA")/?.so"
4 $ alias ucilua="valgrind --quiet --leak-check=full lua -luci"
5
6 check that changes method doesnt leak memory:
7
8 $ cp -R "$TESTDIR/config" .
9 $ export CONFIG_DIR=$(pwd)/config
10 $ ucilua $TESTDIR/lua/test_cases/changes_doesnt_leak.lua
11
12 check that set method with empty table value doesn't leak memory:
13
14 $ cp -R "$TESTDIR/config" .
15 $ export CONFIG_DIR=$(pwd)/config
16 $ ucilua $TESTDIR/lua/test_cases/set_with_empty_table_doesnt_leak.lua
17 false\tCannot set an uci option to an empty table value (esc)