Software /
code /
prosody
Comparison
spec/util_dbuffer_spec.lua @ 11158:3a72cb126d6c
Merge 0.11->trunk
author | Kim Alvefur <zash@zash.se> |
---|---|
date | Mon, 12 Oct 2020 21:29:20 +0200 |
parent | 11114:6a608ecb3471 |
parent | 11156:a8ef69f7fc35 |
child | 11636:11e0a0a08da3 |
comparison
equal
deleted
inserted
replaced
11155:8d692a8a8f48 | 11158:3a72cb126d6c |
---|---|
40 local b = dbuffer.new(); | 40 local b = dbuffer.new(); |
41 it("works", function () | 41 it("works", function () |
42 assert.truthy(b:write("hello world")); | 42 assert.truthy(b:write("hello world")); |
43 assert.truthy(b:discard(6)); | 43 assert.truthy(b:discard(6)); |
44 assert.equal(5, b:length()); | 44 assert.equal(5, b:length()); |
45 assert.equal(5, b:len()); | |
45 assert.equal("world", b:read(5)); | 46 assert.equal("world", b:read(5)); |
46 end); | 47 end); |
47 end); | 48 end); |
48 | 49 |
49 describe(":collapse()", function () | 50 describe(":collapse()", function () |