sapling/tests/test-archive-symlinks.t
Mads Kiilerich fa1c4e5ebe tests: add missing trailing 'cd ..'
Many tests didn't change back from subdirectories at the end of the tests ...
and they don't have to. The missing 'cd ..' could always be added when another
test case is added to the test file.

This change do that tests (99.5%) consistently end up in $TESTDIR where they
started, thus making it simpler to extend them or move them around.
2012-06-11 01:40:51 +02:00

41 lines
695 B
Perl

$ "$TESTDIR/hghave" symlink || exit 80
$ origdir=`pwd`
$ hg init repo
$ cd repo
$ ln -s nothing dangling
avoid tar warnings about old timestamp
$ hg ci -d '2000-01-01 00:00:00 +0000' -qAm 'add symlink'
$ hg archive -t files ../archive
$ hg archive -t tar -p tar ../archive.tar
$ hg archive -t zip -p zip ../archive.zip
files
$ cd "$origdir"
$ cd archive
$ "$TESTDIR/readlink.py" dangling
dangling -> nothing
tar
$ cd "$origdir"
$ tar xf archive.tar
$ cd tar
$ "$TESTDIR/readlink.py" dangling
dangling -> nothing
zip
$ cd "$origdir"
$ unzip archive.zip > /dev/null
$ cd zip
$ "$TESTDIR/readlink.py" dangling
dangling -> nothing
$ cd ..