File: run-tests.lua

package info (click to toggle)
lua-ldoc 1.5.0-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 928 kB
  • sloc: makefile: 63; ansic: 56
file content (20 lines) | stat: -rw-r--r-- 478 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
local PWD = os.getenv("PWD")

local run
if not arg[1] then
  run = function (dir)
     local cmd = 'cd '..dir..' && lua '..PWD..'/ldoc.lua --testing . && diff -r doc cdocs'
     print(cmd)
     os.execute(cmd)
  end
elseif arg[1] == 'update' then
   run = function (dir)
     local cmd = 'cd '..dir..' && lua '..PWD..'/ldoc.lua --dir cdocs --testing .'
     print(cmd)
     os.execute(cmd)
   end
end

for _,d in ipairs{'tests','tests/example','tests/md-test'} do
   run(d)
end