summaryrefslogtreecommitdiff
path: root/testit
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2010-04-25 06:00:30 +1200
committerLars Wirzenius <liw@liw.fi>2010-04-25 06:00:30 +1200
commit12db03c7f917f6d53f2b8990af8ac55ffe21b4f0 (patch)
tree9b91015d51745a3eba13fe7263012992931a4318 /testit
parentf71f1102eea9b095c001d8ea918660c9756873a5 (diff)
downloaddupfiles-12db03c7f917f6d53f2b8990af8ac55ffe21b4f0.tar.gz
Add test for symlinks.
Diffstat (limited to 'testit')
-rwxr-xr-xtestit12
1 files changed, 12 insertions, 0 deletions
diff --git a/testit b/testit
index c0496bb..e385366 100755
--- a/testit
+++ b/testit
@@ -44,6 +44,10 @@ class TestCase(object):
def hardlink(self, name, newname):
os.link(os.path.join(self.tempdir, name),
os.path.join(self.tempdir, newname))
+
+ def symlink(self, name, newname):
+ os.symlink(os.path.join(self.tempdir, name),
+ os.path.join(self.tempdir, newname))
def test(self):
p = subprocess.Popen(['./dupfiles', self.tempdir],
@@ -91,6 +95,14 @@ class TwoHardlinksToSameContent(TestCase):
self.identical = []
+class Symlink(TestCase):
+
+ def setUp(self):
+ self.create('foo', 'foo')
+ self.symlink('foo', 'bar')
+ self.identical = []
+
+
def main():
klasses = [o
for name, o in globals().iteritems()