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 (38 lines) | stat: -rw-r--r-- 1,163 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
-- Test automate file_merge

mtn_setup()

addfile("foo", "foo")
addfile("bar", "bar\none\ntwo\nthree\n")
addfile("baz", "baz\r\naaa\r\nbbb\r\nccc")
commit("testbranch", "base")
base = base_revision()

writefile("foo", "foo\nfirst\nrevision")
writefile("bar", "bar\nzero\none\ntwo\nthree\n")
writefile("baz", "baz\r\nAAA\r\nbbb\r\nccc")
commit("testbranch", "first")
first = base_revision()

revert_to(base)

writefile("foo", "foo\nsecond\nrevision")
writefile("bar", "bar\none\ntwo\nthree\nfour\n")
writefile("baz", "baz\r\naaa\r\nbbb\r\nCCC")
commit("testbranch", "second")
second = base_revision()

check(mtn("automate", "file_merge", first, "foo", second, "foo"), 1, nil, true)
check(qgrep("internal line merger failed", "stderr"))

writefile("expected_bar", "bar\nzero\none\ntwo\nthree\nfour\n")
check(mtn("automate", "file_merge", first, "bar", second, "bar"), 0, true, nil)
canonicalize("stdout")
check(samefile("expected_bar", "stdout"))

writefile("expected_baz", "baz\r\nAAA\r\nbbb\r\nCCC")
check(mtn("automate", "file_merge", first, "baz", second, "baz"), 0, true, nil)
--canonicalize("stdout")
check(samefile("expected_baz", "stdout"))

-- end of file