File: __driver__.lua

package info (click to toggle)
monotone 0.31-6
  • links: PTS
  • area: main
  • in suites: etch, etch-m68k
  • size: 20,680 kB
  • ctags: 14,801
  • sloc: cpp: 87,711; ansic: 64,862; sh: 5,691; lisp: 954; perl: 783; makefile: 509; python: 265; sql: 98; sed: 16
file content (28 lines) | stat: -rw-r--r-- 874 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
25
26
27
28

skip_if(not existsonpath("env"))
mtn_setup()

function noenv_mtn(...)
  return {"env", "-i", unpack(mtn(unpack(arg)))}
end

if os.getenv("OSTYPE") == "msys" then
  local iconv = getpathof("libiconv-2", ".dll")
  local zlib = getpathof("zlib1", ".dll")
  copy(iconv, "libiconv-2.dll")
  copy(zlib, "zlib1.dll")
elseif os.getenv("OSTYPE") == "cygwin" then
  local cygwin = getpathof("cygwin1", ".dll")
  local iconv = getpathof("cygiconv-2", ".dll")
  local intl = getpathof("cygintl-3", ".dll")
  local zlib = getpathof("cygz", ".dll")
  copy(cygwin, "cygwin1.dll")
  copy(iconv, "cygiconv-2.dll")
  copy(intl, "cygintl-3.dll")
  copy(zlib, "cygz.dll")
end

check(noenv_mtn("--help"), 0, false, false)
writefile("testfile", "blah blah")
check(noenv_mtn("add", "testfile"), 0, false, false)
check(noenv_mtn("commit", "--branch=testbranch", "--message=foo"), 0, false, false)