Crates.io | test-mumu |
lib.rs | test-mumu |
version | 0.1.4 |
created_at | 2025-08-15 18:04:09.738778+00 |
updated_at | 2025-08-16 16:34:54.300945+00 |
description | Test suite plugin for the Lava language |
homepage | https://lava.nu11.uk |
repository | https://gitlab.com/tofo/mumu-test |
max_upload_size | |
id | 1797257 |
size | 207,350 |
Test suite plugin for the Lava language
mumu-test
is a native plugin for the Lava/MuMu scripting language providing a full-featured test suite runner, test description framework (describe
/it
), file assertions, error checks, and test helpers for robust automated testing of Lava plugins, scripts, and applications.
describe
/ it
: Organize tests in suitesexpect_equal
, expect_not_equal
, prop_equals
, has_key
, test:expect_error
file_contents_equal
, file_contents_not_equal
, file_contents_length_equal
test:lorem_file
(create lorem test files), test:unique_filename
tests/*.mu
files and see summariesBuild the plugin as a shared library (.so
):
make
make install
This copies libmumutest.so
to /usr/local/lib/
, as expected by the Lava/MuMu runtime.
Enable the plugin in Lava/MuMu:
> extend("test")
Write a test file (e.g., tests/hello_test.mu
):
describe("Sample suite", fn() {
it("should add numbers", fn() {
expect_equal(1 + 1, 2)
})
it("should fail gracefully", fn() {
expect_not_equal("a", "b")
})
it("should throw error", fn() {
test:expect_error(fn() {
error("bad wolf")
}, "wolf")
})
})
Run all tests from CLI:
lava -e 'test:all(fn(pass) { log(pass) })'
lava tests/hello_test.mu
See the source for full parameter details and advanced options.
Dual-licensed under MIT or Apache-2.0 (see LICENSE).
© 2025 Tom Fotheringham and contributors