[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-commits-diffs] net.venge.monotone: 9be877e20ee8b949b523e39fd82
From: |
code |
Subject: |
[Monotone-commits-diffs] net.venge.monotone: 9be877e20ee8b949b523e39fd8217aae119f3fda |
Date: |
Sat, 5 May 2012 00:17:59 +0200 (CEST) |
revision: 9be877e20ee8b949b523e39fd8217aae119f3fda
date: 2012-05-04T22:20:34
author: Richard Hopkins <address@hidden>
branch: net.venge.monotone
changelog:
Add missing func tests for 'erase_descendants' automate command
I thought I already added it in the parent commit; obviously not :)
manifest:
format_version "1"
new_manifest [757a79ff7816a886203d8e6701e3f82c34f6b5e4]
old_revision [fb074f470e8850b00f87bb10369ff7f98015e4fe]
add_file "test/func/automate_erase_descendants/__driver__.lua"
content [45830e0a1e9f33e9031ca9953689b3648a9eb04e]
============================================================
--- /dev/null
+++ test/func/automate_erase_descendants/__driver__.lua 45830e0a1e9f33e9031ca9953689b3648a9eb04e
@@ -0,0 +1,46 @@
+
+mtn_setup()
+
+-- Make sure we fail when given a non-existent revision
+check(mtn("automate", "erase_descendants", "c7539264e83c5d6af4c792f079b5d46e9c128665"), 1, false, false)
+
+-- A
+-- / \
+-- B C
+-- |\
+-- D E
+-- \/
+-- F
+includecommon("automate_ancestry.lua")
+
+revs = make_graph()
+
+-- Now do some checks
+
+-- Empty input gives empty output
+revmap("erase_descendants", {}, {})
+
+-- Single revision input gives the same single revision output
+for _,x in pairs(revs) do
+ revmap("erase_descendants", {x}, {x})
+end
+
+-- Whole revision graph should give roots - A in this case
+revmap("erase_descendants", {revs.a, revs.b, revs.c, revs.d, revs.e, revs.f}, {revs.a})
+
+-- Sibling only inputs should give the same output
+revmap("erase_descendants", {revs.b, revs.c}, {revs.b, revs.c})
+revmap("erase_descendants", {revs.d, revs.e}, {revs.d, revs.e})
+
+-- Siblings with descendants should give just the siblings
+revmap("erase_descendants", {revs.b, revs.c, revs.d, revs.e, revs.f}, {revs.b, revs.c})
+revmap("erase_descendants", {revs.d, revs.e, revs.f}, {revs.d, revs.e})
+
+-- Leaves only input should give the same output
+revmap("erase_descendants", {revs.b, revs.f}, {revs.b, revs.f})
+
+-- Revision with its descendants should give just the revision
+revmap("erase_descendants", {revs.c, revs.d, revs.e, revs.f}, {revs.c})
+revmap("erase_descendants", {revs.e, revs.f}, {revs.e})
+
+
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Monotone-commits-diffs] net.venge.monotone: 9be877e20ee8b949b523e39fd8217aae119f3fda,
code <=