# HG changeset patch # User Matthew Elder # Date 1129696371 25200 # Node ID 5010207c35273ac1331cae44c253dd41fa07cb7f # Parent db571bcaa35d572aef44e3bef6c1f768a77b20ac symlink unit test diff --git a/tests/test-symlinks b/tests/test-symlinks new file mode 100755 --- /dev/null +++ b/tests/test-symlinks @@ -0,0 +1,24 @@ +#!/bin/sh +#Test bug regarding symlinks that showed up in hg 0.7 +#Author: Matthew Elder + +#make and initialize repo +hg init test; cd test; + +#make a file and a symlink +touch foo; ln -s foo bar; + +#import with addremove -- symlink walking should _not_ screwup. +hg addremove + +#commit -- the symlink should _not_ appear added to dir state +hg commit -m 'initial' + +#add a new file so hg will let me commit again +touch bomb + +#again, symlink should _not_ show up on dir state +hg addremove + +#Assert screamed here before, should go by without consequence +hg commit -m 'is there a bug?' diff --git a/tests/test-symlinks.out b/tests/test-symlinks.out new file mode 100644 --- /dev/null +++ b/tests/test-symlinks.out @@ -0,0 +1,4 @@ +bar: unsupported file type (type is symbolic link) +adding foo +bar: unsupported file type (type is symbolic link) +adding bomb