#!/usr/bin/env bash

# A regression test for issue567

set -ev

test $DARCS || DARCS=$PWD/../darcs
ACTUAL_DARCS=`which $DARCS`
DARCSPATH=`dirname $ACTUAL_DARCS`
PATH="$DARCSPATH:$PATH"
export PATH
echo $PATH

EMAIL=tester
export EMAIL

rm -rf temp
mkdir temp
cd temp
$DARCS init
mkdir dir
touch dir/t.t
$DARCS add dir
$DARCS add dir/t.t
$DARCS record -am 'initial add'

# grand finale? Can we move the file to itself? 
darcs mv dir/t.t dir/

cd ..

rm -rf temp
