File: fix-tests-for-newer-lua-versions.patch

package info (click to toggle)
lua-geoip 0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm, forky, sid, trixie
  • size: 244 kB
  • sloc: ansic: 765; makefile: 10; sh: 10
file content (24 lines) | stat: -rw-r--r-- 718 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
From: Freexian Packaging Team <team+freexian@tracker.debian.org>
Date: Thu, 21 Oct 2021 15:57:41 +0200
Subject: Fix tests for lua >= 5.3


unpack was moved to table.unpack
---
 test/test.lua | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/test/test.lua b/test/test.lua
index 922dd0d..2797f51 100644
--- a/test/test.lua
+++ b/test/test.lua
@@ -10,6 +10,9 @@ local geoip_country = require 'geoip.country'
 local geoip_country_filename = select(1, ...) or "./GeoIP.dat"
 local geoip_country6_filename = select(3, ...) or "./GeoIPv6.dat"
 
+-- Since lua 5.2 unpack was moved to table.unpack
+local unpack = unpack or table.unpack
+
 print("TESTING lua-geoip")
 print("")
 print("VERSION: ", assert(geoip._VERSION))