Skip to content

Commit 51fa0a8

Browse files
HHHartmannnwf
authored andcommitted
reapply lost changes - fix local/local mix
1 parent 7aad2b3 commit 51fa0a8

File tree

1 file changed

+5
-8
lines changed

1 file changed

+5
-8
lines changed

tests/NTest_pixbuf.lua

Lines changed: 5 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
local N = require('NTest')("pixbuf_1")
22

3-
local buffer, buffer1, buffer2, buffer3
4-
53
local function initBuffer(buf, ...)
6-
--local i,v
74
for i,v in ipairs({...}) do
85
buf:set(i, v, v*2, v*3, v*4)
96
end
@@ -55,7 +52,7 @@ N.test('replace correctly', function()
5552
end)
5653

5754
N.test('replace correctly issue #2921', function()
58-
buffer = pixbuf.newBuffer(5, 3)
55+
local buffer = pixbuf.newBuffer(5, 3)
5956
buffer:replace(string.char(3,255,165,33,0,244,12,87,255), -7)
6057
ok(eq(buffer:dump(), string.char(3,255,165,33,0,244,12,87,255,0,0,0,0,0,0)), "RGBW")
6158
end)
@@ -188,8 +185,8 @@ N.test('shift LOGICAL', function()
188185
end)
189186

190187
N.test('shift LOGICAL issue #2946', function()
191-
buffer1 = pixbuf.newBuffer(4, 4)
192-
buffer2 = pixbuf.newBuffer(4, 4)
188+
local buffer1 = pixbuf.newBuffer(4, 4)
189+
local buffer2 = pixbuf.newBuffer(4, 4)
193190

194191
initBuffer(buffer1,7,8,9,12)
195192
initBuffer(buffer2,0,0,0,0)
@@ -275,11 +272,11 @@ N.test('map', function()
275272
buffer1:map(function(a,b,c,d) return b,a,c,d end)
276273
ok(eq("BACDBACDBACDBACD", buffer1:dump()), "swizzle")
277274

278-
buffer2 = pixbuf.newBuffer(4, 1)
275+
local buffer2 = pixbuf.newBuffer(4, 1)
279276
buffer2:map(function(b,a,c,d) return c end, buffer1) -- luacheck: ignore
280277
ok(eq("CCCC", buffer2:dump()), "projection")
281278

282-
buffer3 = pixbuf.newBuffer(4, 3)
279+
local buffer3 = pixbuf.newBuffer(4, 3)
283280
buffer3:map(function(b,a,c,d) return a,b,d end, buffer1) -- luacheck: ignore
284281
ok(eq("ABDABDABDABD", buffer3:dump()), "projection 2")
285282

0 commit comments

Comments
 (0)