Software /
code /
prosody
Comparison
spec/util_ringbuffer_spec.lua @ 10953:c3b3ac63f4c3
util.ringbuffer: Ensure unsigned chars are always returned from :byte()
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Wed, 24 Jun 2020 12:34:20 +0100 |
parent | 10949:8b5b35baf370 |
child | 10954:fc310727adfb |
comparison
equal
deleted
inserted
replaced
10952:05d218aae3d1 | 10953:c3b3ac63f4c3 |
---|---|
90 for j = -13, 13 do | 90 for j = -13, 13 do |
91 test_byte(b, i, j); | 91 test_byte(b, i, j); |
92 end | 92 end |
93 end | 93 end |
94 end); | 94 end); |
95 | |
96 it("works with characters > 127", function () | |
97 local b = rb.new(); | |
98 b:write(string.char(0, 140)); | |
99 local r = { b:byte(1, 2) }; | |
100 assert.same({ 0, 140 }, r); | |
101 end); | |
95 end); | 102 end); |
96 end); | 103 end); |