diff options
author | Lars Wirzenius <liw@liw.fi> | 2010-04-25 06:00:30 +1200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2010-04-25 06:00:30 +1200 |
commit | 12db03c7f917f6d53f2b8990af8ac55ffe21b4f0 (patch) | |
tree | 9b91015d51745a3eba13fe7263012992931a4318 /testit | |
parent | f71f1102eea9b095c001d8ea918660c9756873a5 (diff) | |
download | dupfiles-12db03c7f917f6d53f2b8990af8ac55ffe21b4f0.tar.gz |
Add test for symlinks.
Diffstat (limited to 'testit')
-rwxr-xr-x | testit | 12 |
1 files changed, 12 insertions, 0 deletions
@@ -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() |