File: __driver__.lua

package info (click to toggle)
monotone 1.1-4+deb8u2
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 20,664 kB
  • ctags: 8,113
  • sloc: cpp: 86,443; sh: 6,906; perl: 924; makefile: 838; python: 517; lisp: 379; sql: 118; exp: 91; ansic: 52
file content (33 lines) | stat: -rw-r--r-- 987 bytes parent folder | download | duplicates (4)
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
29
30
31
32
33
mtn_setup()

-- Prepare the test by copying the lua hook to test
-- and adding a few lines to test_hooks.lua
mkdir("hooks.d")
check(copy(srcdir.."/../extra/mtn-hooks/monotone-cvs-ignore.lua",
	   "hooks.d/monotone-cvs-ignore.lua"))

append("test_hooks.lua", "\
\
includedirpattern(get_confdir() .. \"/hooks.d\",\"*.conf\")\
includedirpattern(get_confdir() .. \"/hooks.d\",\"*.lua\")\
")

-- Do the test
writefile("test1.txt", "foo")
mkdir("subdir")
writefile("subdir/test2.txt", "foo")

check(mtn("ls","unknown"), 0, true, false)
check(grep("^test1\\.txt$", "stdout"), 0, false, false)

writefile("subdir/.cvsignore", "*.txt")

check(mtn("ls","unknown"), 0, true, false)
check(grep("^test1\\.txt$", "stdout"), 0, false, false)
check(grep("^subdir/test2\\.txt$", "stdout"), 1, false, false)

writefile(".cvsignore", "*.txt")

check(mtn("ls","unknown"), 0, true, false)
check(grep("^test1\\.txt$", "stdout"), 1, false, false)
check(grep("^subdir/test2\\.txt$", "stdout"), 1, false, false)