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
|
mtn_setup()
check(mtn("automate", "graph"), 0, 0, false)
-- A
-- / \
-- B C
-- |\
-- D E
-- \/
-- F
includecommon("automate_ancestry.lua")
revs = make_graph()
-- Now do some checks
check(mtn("automate", "graph"), 0, true, false)
canonicalize("stdout")
de = {revs.d, revs.e}
table.sort(de)
lines = {revs.a,
revs.b.." "..revs.a,
revs.c.." "..revs.a,
revs.d.." "..revs.c,
revs.e.." "..revs.c,
revs.f.." "..table.concat(de, " ")}
table.sort(lines)
writefile("graph", table.concat(lines, "\n").."\n")
check(samefile("stdout", "graph"))
|