File: __driver__.lua

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 (37 lines) | stat: -rw-r--r-- 1,377 bytes parent folder | download | duplicates (6)
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
34
35
36
37

mtn_setup()

mkdir("gongolo")

writefile("include.lua", 'include("../gongolo/aaa.rc")')

writefile("includedir.lua", 'includedir("../gongolo")')

writefile("includedirpattern.lua", 'includedirpattern("../gongolo","*.rc")')

-- write two files and check that they will be invoked in alphabetic order
check(get("aaa.rc", "gongolo/aaa.rc"))
check(get("bbb.zz", "gongolo/bbb.zz"))

-- setup a wrk dir
check(mtn("setup", "--branch=testbranch", "alt_wrk"), 0, false, false)

-- include directly a single file
check(indir("alt_wrk", mtn("--root=.", "--rcfile=../include.lua", "status")), 0, true, false)
check(qgrep("BOOGA BOOGA", "stdout"))

-- include dir
check(indir("alt_wrk", mtn("--root=.", "--rcfile=../includedir.lua", "status")), 0, true, false)
check(qgrep("BOOGA BOOGACICCA CICCA", "stdout"))

-- include dir with patterns
check(indir("alt_wrk", mtn("--root=.", "--rcfile=../includedirpattern.lua", "status")), 0, true, false)
check(qgrep("BOOGA BOOGA", "stdout"))

-- write a third file: should be read between the two previous ones
check(get("aba.rc", "gongolo/aba.rc"))
check(indir("alt_wrk", mtn("--root=.", "--rcfile=../includedir.lua", "status")), 0, true, false)
check(qgrep("BOOGA BOOGAhu huCICCA CICCA", "stdout"))

check(indir("alt_wrk", mtn("--root=.", "--rcfile=../includedirpattern.lua", "status")), 0, true, false)
check(qgrep("BOOGA BOOGAhu hu", "stdout"))