aboutsummaryrefslogtreecommitdiffstats
path: root/spec/util_dbuffer_spec.lua
diff options
context:
space:
mode:
authorKim Alvefur <zash@zash.se>2020-10-12 20:20:02 +0200
committerKim Alvefur <zash@zash.se>2020-10-12 20:20:02 +0200
commit282471bcaf402ce69a46f280e8eeb15fbada360f (patch)
treee2b8a156016a261a980bfa2ff7ba3ece37ebdbaa /spec/util_dbuffer_spec.lua
parent531f26f144e35c9b3f3c4cf5fb4b278534520d00 (diff)
downloadprosody-282471bcaf402ce69a46f280e8eeb15fbada360f.tar.gz
prosody-282471bcaf402ce69a46f280e8eeb15fbada360f.zip
util.dbuffer: Expose length as :len() method, like strings
Ref #1598
Diffstat (limited to 'spec/util_dbuffer_spec.lua')
-rw-r--r--spec/util_dbuffer_spec.lua1
1 files changed, 1 insertions, 0 deletions
diff --git a/spec/util_dbuffer_spec.lua b/spec/util_dbuffer_spec.lua
index af404042..2b1af835 100644
--- a/spec/util_dbuffer_spec.lua
+++ b/spec/util_dbuffer_spec.lua
@@ -42,6 +42,7 @@ describe("util.dbuffer", function ()
assert.truthy(b:write("hello world"));
assert.truthy(b:discard(6));
assert.equal(5, b:length());
+ assert.equal(5, b:len());
assert.equal("world", b:read(5));
end);
end);