Software /
code /
prosody
Comparison
spec/util_cache_spec.lua @ 9323:3259653512e7
util.cache tests: Add annotation to fix [luacheck] warning
author | Matthew Wild <mwild1@gmail.com> |
---|---|
date | Mon, 17 Sep 2018 15:25:47 +0100 |
parent | 8236:4878e4159e12 |
child | 11366:618ab9bba1c2 |
comparison
equal
deleted
inserted
replaced
9322:4ce972d77c53 | 9323:3259653512e7 |
---|---|
286 assert.are.equal(c4:set("d", 4), false); | 286 assert.are.equal(c4:set("d", 4), false); |
287 | 287 |
288 expect_kv("c", 3, c4:head()); | 288 expect_kv("c", 3, c4:head()); |
289 expect_kv("a", 1, c4:tail()); | 289 expect_kv("a", 1, c4:tail()); |
290 | 290 |
291 local c5 = cache.new(3, function (k, v) | 291 local c5 = cache.new(3, function (k, v) --luacheck: ignore 212/v |
292 if k == "a" then | 292 if k == "a" then |
293 return nil; | 293 return nil; |
294 elseif k == "b" then | 294 elseif k == "b" then |
295 return true; | 295 return true; |
296 end | 296 end |