oxwm

https://git.tonybtw.com/oxwm.git git://git.tonybtw.com/oxwm.git
469 bytes raw
1
const std = @import("std");
2
const testing = std.testing;
3
const lua = @import("lua");
4
const Config = lua.config_mod.Config;
5
6
test "test-config.lua loads without errors" {
7
    var cfg = Config.init(testing.allocator);
8
    defer cfg.deinit();
9
10
    const initialized = lua.init(&cfg);
11
    if (!initialized) {
12
        return error.LuaInitFailed;
13
    }
14
    defer lua.deinit();
15
16
    const loaded = lua.load_file("resources/test-config.lua");
17
    try testing.expect(loaded);
18
}