[Piuparts-commits] [SCM] piuparts git repository branch, master, updated. eda668423fa87898c59d1075118693714aa5a053
Andreas Beckmann
debian at abeckmann.de
Fri Dec 23 10:26:28 UTC 2011
The following commit has been merged in the master branch:
commit 9ed4b3eb48e8e140f31dcc9d9aa48d8bfdcba9a5
Author: Andreas Beckmann <debian at abeckmann.de>
Date: Wed Nov 23 01:38:02 2011 +0100
add 'foo -> bar/' link unittests (trailing slash)
foo -> bar/
needs to be parsed correctly, too
Signed-off-by: Andreas Beckmann <debian at abeckmann.de>
diff --git a/piuparts.py b/piuparts.py
index e2aeb9c..78b30ff 100644
--- a/piuparts.py
+++ b/piuparts.py
@@ -565,6 +565,8 @@ class IsBrokenSymlinkTests(unittest.TestCase):
self.symlink("dir", "dir-link")
os.mkdir(os.path.join(self.testdir, "dir/subdir"))
self.symlink("subdir", "dir/subdir-link")
+ self.symlink("notexist/", "trailing-slash-broken")
+ self.symlink("dir/", "trailing-slash-works")
self.symlink("selfloop", "selfloop")
self.symlink("/absolute-selfloop", "absolute-selfloop")
self.symlink("../dir/selfloop", "dir/selfloop")
@@ -594,6 +596,10 @@ class IsBrokenSymlinkTests(unittest.TestCase):
self.failUnless(is_broken_symlink(self.testdir, self.testdir,
"absolute-broken-to-symlink"))
+ def testTrailingSlashBroken(self):
+ self.failUnless(is_broken_symlink(self.testdir, self.testdir,
+ "trailing-slash-broken"))
+
def testSelfLoopBroken(self):
self.failUnless(is_broken_symlink(self.testdir, self.testdir,
"selfloop"))
@@ -636,6 +642,10 @@ class IsBrokenSymlinkTests(unittest.TestCase):
self.failIf(is_broken_symlink(self.testdir, self.testdir,
"absolute-works-to-symlink"))
+ def testTrailingSlashWorks(self):
+ self.failIf(is_broken_symlink(self.testdir, self.testdir,
+ "trailing-slash-works"))
+
def testMultiLevelNestedSymlinks(self):
# target/first-link -> ../target/second-link -> ../target
--
piuparts git repository
More information about the Piuparts-commits
mailing list