From 4841d2f6cc038a68c03f9f8d382b0a5aa3297b01 Mon Sep 17 00:00:00 2001 From: David Caldwell Date: Wed, 15 May 2013 18:06:31 -0700 Subject: [PATCH] Also test Monotone --- test/main.test | 1 + test/vcs/mtn.sh | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+) create mode 100644 test/vcs/mtn.sh diff --git a/test/main.test b/test/main.test index 322931e..33783fc 100644 --- a/test/main.test +++ b/test/main.test @@ -17,6 +17,7 @@ rm a # Some VCSes won't show diffs for removed files unless you tell it they are removed: [ $VC == 'cvs' ] && cvs rm a [ $VC == 'hg' ] && hg rm a +[ $VC == 'mtn' ] && mtn drop a $VC_DIFF > removed.patch || true diff --git a/test/vcs/mtn.sh b/test/vcs/mtn.sh new file mode 100644 index 0000000..2bd1664 --- /dev/null +++ b/test/vcs/mtn.sh @@ -0,0 +1,24 @@ +mtn_init () { + WD=$1 + REPO=$2 + + export MTN_KEYDIR=$(mktemp -d "$TESTDIR_ABS/tmp/keydir.XXXXXXX") + + # Monotone doesns't like the db dir to exist when you init it. + [ -d "$REPO" ] && rmdir "$REPO" + + mtn --keydir "$MTN_KEYDIR" db init --db="$REPO" + mtn --keydir "$MTN_KEYDIR" --db="$REPO" --branch=test setup "$WD" + (cd "$WD" && mtn automate generate_key commit-patch-automated-tester@example.com '') + + export VC_DIFF="mtn diff --without-header" + export DIFF_PREFIX="" +} + +mtn_cleanup () { + WD=$1 + REPO=$2 + rm -rf "$REPO" + rm -rf "$WD" + rm -rf "$MTN_KEYDIR" +} -- 2.51.2