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 (27 lines) | stat: -rw-r--r-- 944 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
mtn_setup()

check(get("extra_rc"))

addfile("foo", "random info\n")
commit()
rev_a = base_revision()

-- a simple command w/o the use of options
check(mtn("check_head", "--rcfile=extra_rc", rev_a), 0, false, true)
check(samelines("stderr", {"mtn: lua: heads are equal", "mtn: lua: end of command"}))

addfile("bar", "more random info\n")
commit()
rev_b = base_revision()

-- another simple command this time with arguments which are set as options
-- in the underlying automate content_diff calls. we test here that
--  a) the basic call succeeds
--  b) options given to mtn_automate are parsed correctly (see extra_rc)
--  c) outer command line arguments are not passed to the inner mtn_automate
--     calls (otherwise both revisions would lead to path restriction errors)
check(mtn("diff_two_revs", "--rcfile=extra_rc", rev_a, rev_b), 0, true, false)


check(qgrep('add_file "bar"', "stdout"))
check(qgrep("\\+more random info", "stdout"))