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 (43 lines) | stat: -rw-r--r-- 1,273 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
34
35
36
37
38
39
40
41
42
43
-- Demonstrate that get_default_command_options works, and that
-- command line options override it. Also show that --full
-- --no-verbose works.

mtn_setup()

check(get("default_options.lua"))

addfile("foo", "bar")
commit()

check(mtn("log"), 0, true, false)
rename("stdout", "normallog")

check(mtn("log", "--brief"), 0, true, false)
rename("stdout", "brieflog")

check(mtn("log", "--rcfile=default_options.lua"), 0, true, false)
check(samefile("stdout", "brieflog"))

check(mtn("log", "--brief", "--no-brief"), 0, true, false)
check(samefile("stdout", "normallog"))

check(mtn("log", "--rcfile=default_options.lua", "--no-brief"), 0, true, false)
check(samefile("stdout", "normallog"))

check(mtn("version", "--concise"), 0, true, false)
rename("stdout", "normalversion")

check(mtn("version", "--full"), 0, true, false)
rename("stdout", "fullversion")

check(mtn("version", "--rcfile=default_options.lua"), 0, true, false)
check(samefile("stdout", "fullversion"))

check(mtn("version", "--full", "--concise"), 0, true, false)
check(samefile("stdout", "normalversion"))

check(mtn("version", "--rcfile=default_options.lua", "--concise"), 0, true, false)
check(samefile("stdout", "normalversion"))

check(mtn("status", "--rcfile=default_options.lua"), 1, false, false)