Files
wireplumber/tests/wplua/scripts/require.lua
Ashok Sidipotu 72536261e9 policy-node.lua: Second round of cleanup.
- WirePlumber Lua now facilitates Lua libraries/modules, utilize this and create
  modules. Add some tests around this functionality.
- Create policy-hooks.lua containing all the hooks to find-target events
- Create policy-utils.lua module and push all the policy utility functions to it.
- Create common-utils.lua module and push the common utility functions to it.
- Remove all the above functionality from policy-node.lua and clean it up.
2023-04-17 07:47:09 -04:00

20 lines
463 B
Lua

local testlib = require ("testlib")
assert (package.loaded ["testlib"] == testlib)
assert (type (testlib) == "table")
local x = 1
x = testlib.test_add_ten (x)
assert (x == 11)
local val_table = testlib.get_empty_table ("test-key")
assert (type (val_table) == "table")
val_table ["key"] = "value"
val_table.id = 100
testlib.set_table ("test-key", val_table)
local val1 = testlib.get_table ("test-key")
assert (val1 ["key"] == "value")
assert (val1.id == 100)