File: testhooks

package info (click to toggle)
monotone 1.1-9
  • links: PTS, VCS
  • area: main
  • in suites: stretch
  • size: 20,984 kB
  • ctags: 8,622
  • sloc: cpp: 86,450; sh: 6,906; perl: 924; makefile: 813; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (23 lines) | stat: -rw-r--r-- 565 bytes parent folder | download | duplicates (7)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
function ignore_file (name)
  ok = true

  filename = write_to_temporary_file("foo")
  dat = read_contents_of_file(filename, "r")
  if dat ~= "foo" then ok = false end

  if globish_match("a*b", "abc") then ok = false end
  if not globish_match("a*b", "acb") then ok = false end
  if globish_match("a{b", "abc") ~= nil then ok = false end

  if ok then
    if existsonpath("touch") == 0 then
      execute ("touch", "outfile")
    else
      x = io.open("outfile", "w")
      x:close()
    end
  end

  ignore_file = function (name) return true end
return true
end