diff options
Diffstat (limited to 'testit')
-rwxr-xr-x | testit | 13 |
1 files changed, 13 insertions, 0 deletions
@@ -40,6 +40,10 @@ class TestCase(object): def create(self, name, content): file(os.path.join(self.tempdir, name), 'w').write(content) + + def hardlink(self, name, newname): + os.link(os.path.join(self.tempdir, name), + os.path.join(self.tempdir, newname)) def test(self): p = subprocess.Popen(['./dupfiles', self.tempdir], @@ -79,10 +83,19 @@ class TwoIdenticalFiles(TestCase): self.identical = ['foo', 'bar'] +class TwoHardlinksToSameContent(TestCase): + + def setUp(self): + self.create('foo', 'foo') + self.hardlink('foo', 'bar') + self.identical = [] + + def main(): klasses = [ DifferentFiles, TwoIdenticalFiles, + TwoHardlinksToSameContent, ] for klass in klasses: test = klass() |