diff options
| author | amelia squires <[email protected]> | 2024-09-29 02:49:05 -0500 |
|---|---|---|
| committer | amelia squires <[email protected]> | 2024-09-29 02:49:05 -0500 |
| commit | fe33c0e979ebfc41c3eb9f561589f0d5d8810aaf (patch) | |
| tree | 526d2f71581e2584c9de2b958fd89b6ce0fb0ac1 /tests | |
| parent | 602818b895fec710b0534b0b8fa7f5e1f57203c2 (diff) | |
docs n stuff
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/buffer.lua | 9 | ||||
| -rw-r--r-- | tests/net.lua | 2 | ||||
| -rw-r--r-- | tests/t.lua | 16 |
3 files changed, 23 insertions, 4 deletions
diff --git a/tests/buffer.lua b/tests/buffer.lua new file mode 100644 index 0000000..3309aed --- /dev/null +++ b/tests/buffer.lua @@ -0,0 +1,9 @@ +llby = require "lullaby" + +b = llby.thread.buffer(llby.crypto.md5()) + +print(b.update(b:get(), "meow"):final()) +print(b.update(b:get(), "meow"):final()) +b:mod(function(this) return this:update("meow") end) +print(b.update(b:get(), "meow"):final()) + diff --git a/tests/net.lua b/tests/net.lua index d1b5369..e389fb0 100644 --- a/tests/net.lua +++ b/tests/net.lua @@ -58,7 +58,7 @@ net.listen( end)
server:GET("/aa", function(res, req)
- res.header["Content-Type"] = "text/plain"
+ --res.header["Content-Type"] = "text/plain"
res:sendfile("readme.md")
end)
diff --git a/tests/t.lua b/tests/t.lua index 9c71c61..09ee15d 100644 --- a/tests/t.lua +++ b/tests/t.lua @@ -1,5 +1,15 @@ a = require "lullaby" -o = a.crypto.sha224() ---o:update("me") ---print(o:final()) +b = coroutine.create(function() + os.execute("sleep 2") + print("co") +end) + +c = a.thread.async(function(res, req) + coroutine.resume(b) +end) + +os.execute("sleep 0.5") +print("owo") + +c:await() |
