lean2/tests/lua/io_state1.lua
Leonardo de Moura 99a811a586 feat(bindings/lua): expose io_state object in the Lua API
Signed-off-by: Leonardo de Moura <leonardo@microsoft.com>
2013-11-26 12:54:47 -08:00

9 lines
297 B
Lua

local ios = io_state()
assert(is_io_state(ios))
ios:print(Const("a"), Const("b"))
print(ios:get_options())
assert(is_formatter(ios:get_formatter()))
ios:set_options(options({"pp", "unicode"}, false))
print(ios:get_options())
ios:print_diagnostic("warning")
ios:print_diagnostic(ios:get_options())