1 civet = require "ci/test/civet"
2 local curl = require "cURL"
4 describe("civetweb basic", function()
15 it("should serve a simple get request", function()
23 :setopt_url('http://localhost:' .. civet.port .. "/")
24 :setopt_writefunction(capture)
28 --print('rescode:' .. c.getinfo(curl.INFO_RESPONSE_CODE))
30 assert.are.equal('Index of', string.match(out, 'Index of'))
31 assert.are.equal('01_basic_test_dir', string.match(out, '01_basic_test_dir'))
32 assert.are.equal('01_basic_test_file', string.match(out, '01_basic_test_file'))