tests: unify test-archive-symlinks
authorMartin Geisler <mg@lazybytes.net>
Sat, 14 Aug 2010 02:26:53 +0200
changeset 11854 aa2abde72da1
parent 11853 afe19a1bf9d3
child 11855 054b0d9c3f0c
tests: unify test-archive-symlinks
tests/test-archive-symlinks
tests/test-archive-symlinks.out
tests/test-archive-symlinks.t
--- a/tests/test-archive-symlinks	Sat Aug 14 02:22:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-#!/bin/sh
-
-"$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
-
-echo '% files'
-cd "$origdir"
-cd archive
-$TESTDIR/readlink.py dangling
-
-echo '% tar'
-cd "$origdir"
-tar xf archive.tar
-cd tar
-$TESTDIR/readlink.py dangling
-
-echo '% zip'
-cd "$origdir"
-unzip archive.zip > /dev/null
-cd zip
-$TESTDIR/readlink.py dangling
--- a/tests/test-archive-symlinks.out	Sat Aug 14 02:22:10 2010 +0200
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,6 +0,0 @@
-% files
-dangling -> nothing
-% tar
-dangling -> nothing
-% zip
-dangling -> nothing
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/tests/test-archive-symlinks.t	Sat Aug 14 02:26:53 2010 +0200
@@ -0,0 +1,38 @@
+  $ "$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