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 (28 lines) | stat: -rw-r--r-- 913 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
-- Test --reverse option for diff

mtn_setup()

addfile("file1", "1: data 1\n")
commit()
rev = base_revision()

writefile("file1", "1: data 2\n")

-- illegal --reverse option
check(mtn("diff", "--reverse"), 1, false, true)
check(qgrep("'--reverse' only allowed with exactly one revision", "stderr"))

check(mtn("diff", "--reverse", rev, rev), 1, false, true)
check(qgrep("'--reverse' only allowed with exactly one revision", "stderr"))

-- no --reverse option
check(mtn("diff", "--revision=" .. rev), 0, true, false)
check(qgrep("from \\[614d24f144edd2ef92ad9f8bc6d25bcf77e04101\\]", "stdout"))
check(qgrep("to \\[50812c5d2dcc96a92cea9c1c6ee7fd093774a4ea\\]", "stdout"))

check(mtn("diff", "--reverse", "--revision=" .. rev), 0, true, false)
check(qgrep("to \\[614d24f144edd2ef92ad9f8bc6d25bcf77e04101\\]", "stdout"))
check(qgrep("from \\[50812c5d2dcc96a92cea9c1c6ee7fd093774a4ea\\]", "stdout"))


-- end of file