diff options
author | Philipp Janda <siffiejoe@gmx.net> | 2018-07-29 19:11:17 +0200 |
---|---|---|
committer | Philipp Janda <siffiejoe@gmx.net> | 2018-07-29 19:11:17 +0200 |
commit | 45ae6fe772fc8ede844ddd704e870a6d24b4950c (patch) | |
tree | b13391b279cdb8b624354cd7676fda745983be4a | |
parent | c325be435c64be57cf2210fa6936af0d425d0ce0 (diff) | |
download | lua-compat-5.3-45ae6fe772fc8ede844ddd704e870a6d24b4950c.tar.gz lua-compat-5.3-45ae6fe772fc8ede844ddd704e870a6d24b4950c.tar.bz2 lua-compat-5.3-45ae6fe772fc8ede844ddd704e870a6d24b4950c.zip |
Improve `lua_getextraspace` tests.
-rwxr-xr-x | tests/test.lua | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/tests/test.lua b/tests/test.lua index 9bb08da..0640cae 100755 --- a/tests/test.lua +++ b/tests/test.lua | |||
@@ -684,18 +684,32 @@ print("requiref", type(a), type(b), type(c), | |||
684 | type(requiref1), type(requiref2), type(requiref3)) | 684 | type(requiref1), type(requiref2), type(requiref3)) |
685 | 685 | ||
686 | ___'' | 686 | ___'' |
687 | mod.extraspace("abc") | ||
688 | print("getextraspace", mod.extraspace("xyz")) | ||
689 | local c = coroutine.wrap(function() | 687 | local c = coroutine.wrap(function() |
690 | print("getextraspace", mod.extraspace("uvw")) | 688 | mod.extraspace("uvw") |
691 | print("getextraspace", mod.extraspace("123")) | 689 | print("getextraspace", mod.extraspace()) |
690 | coroutine.yield() | ||
691 | print("getextraspace", mod.extraspace()) | ||
692 | coroutine.yield() | 692 | coroutine.yield() |
693 | print("getextraspace", mod.extraspace("asd")) | 693 | print("getextraspace", mod.extraspace()) |
694 | end) | 694 | end) |
695 | c() | 695 | c() |
696 | print("getextraspace", mod.extraspace("456")) | 696 | mod.extraspace("abc") |
697 | print("getextraspace", mod.extraspace()) | ||
698 | c() | ||
699 | local d = coroutine.wrap(function() | ||
700 | print("getextraspace", mod.extraspace()) | ||
701 | mod.extraspace("xyz") | ||
702 | print("getextraspace", mod.extraspace()) | ||
703 | coroutine.yield() | ||
704 | print("getextraspace", mod.extraspace()) | ||
705 | coroutine.yield() | ||
706 | print("getextraspace", mod.extraspace()) | ||
707 | end) | ||
708 | d() | ||
709 | print("getextraspace", mod.extraspace()) | ||
710 | mod.extraspace("123") | ||
697 | c() | 711 | c() |
698 | print("getextraspace", mod.extraspace("789")) | 712 | d() |
699 | 713 | ||
700 | ___'' | 714 | ___'' |
701 | local proxy, backend = {}, {} | 715 | local proxy, backend = {}, {} |