test_ucilua_testcases.t 621 B

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