]> granicus.if.org Git - python/commitdiff
added commonprefix test cases
authorSkip Montanaro <skip@pobox.com>
Wed, 23 Aug 2000 16:54:27 +0000 (16:54 +0000)
committerSkip Montanaro <skip@pobox.com>
Wed, 23 Aug 2000 16:54:27 +0000 (16:54 +0000)
Lib/test/test_ntpath.py

index ae9054b3a89bdeb7daa745a2c7c7720542251e42..11f2f44167ca3e12fff191135aca963e4bd661dd 100644 (file)
@@ -37,6 +37,12 @@ tester('ntpath.isabs("\\foo\\bar")', 1)
 
 tester('ntpath.abspath("C:\\")', "C:\\")
 
+tester('ntpath.commonprefix(["/home/swenson/spam", "/home/swen/spam"])',
+       "/home/swen")
+tester('ntpath.commonprefix(["\\home\\swen\\spam", "\\home\\swen\\eggs"])',
+       "\\home\\swen\\")
+tester('ntpath.commonprefix(["/home/swen/spam", "/home/swen/spam"])',
+       "/home/swen/spam")
 
 if errors:
        print str(errors) + " errors."