File: test-data_spec.lua

package info (click to toggle)
lua-mmdb 0.2-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 112 kB
  • sloc: makefile: 6
file content (13 lines) | stat: -rw-r--r-- 329 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
-- TODO: a real 'ls', this is a quick hack
local function ls(dir)
	return assert(io.popen("ls -1 " .. dir)):lines()
end

describe("mmdb", function()
	local mmdb = require "mmdb"
	for file in ls("spec/MaxMind-DB/test-data/*.mmdb") do
		it("can open MaxMind test data file " .. file, function()
			mmdb.open(file)
		end)
	end
end)