Comparison

spec/util_ringbuffer_spec.lua @ 10960:f84e0e2faae2

util.ringbuffer: Fix accidentally committed test change (thanks buildbot)
author Matthew Wild <mwild1@gmail.com>
date Thu, 25 Jun 2020 15:45:13 +0100
parent 10954:fc310727adfb
comparison
equal deleted inserted replaced
10959:877ceb4feb6d 10960:f84e0e2faae2
77 assert.same(string_result, buffer_result, ("buffer:byte(%d, %s) does not match string:byte()"):format(x, y and ("%d"):format(y) or "nil")); 77 assert.same(string_result, buffer_result, ("buffer:byte(%d, %s) does not match string:byte()"):format(x, y and ("%d"):format(y) or "nil"));
78 end 78 end
79 79
80 it("is equivalent to string:byte", function () 80 it("is equivalent to string:byte", function ()
81 local b = rb.new(6); 81 local b = rb.new(6);
82 assert.truthy(b:write("foo"..string.char(0, 140).."obar")); 82 assert.truthy(b:write("foobar"));
83 b:read(3); 83 b:read(3);
84 b:write("foo"); 84 b:write("foo");
85 test_byte(b, 1); 85 test_byte(b, 1);
86 test_byte(b, 3); 86 test_byte(b, 3);
87 test_byte(b, -1); 87 test_byte(b, -1);