Diff

spec/util_dbuffer_spec.lua @ 11156:a8ef69f7fc35 0.11

util.dbuffer: Expose length as :len() method, like strings Ref #1598
author Kim Alvefur <zash@zash.se>
date Mon, 12 Oct 2020 20:20:02 +0200
parent 11105:3c0940f3cf74
child 11158:3a72cb126d6c
line wrap: on
line diff
--- a/spec/util_dbuffer_spec.lua	Wed Oct 07 13:33:02 2020 +0200
+++ b/spec/util_dbuffer_spec.lua	Mon Oct 12 20:20:02 2020 +0200
@@ -42,6 +42,7 @@
 			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);