Mercurial > hg
diff tests/hghave @ 6806:2134d6c09432
Add test for case folding issues
author | Patrick Mezard <pmezard@gmail.com> |
---|---|
date | Fri, 11 Jul 2008 14:40:44 +0200 |
parents | 59f7b804352f |
children | ddfcefab8b97 |
line wrap: on
line diff
--- a/tests/hghave Tue Jul 01 17:59:31 2008 +0100 +++ b/tests/hghave Fri Jul 11 14:40:44 2008 +0200 @@ -57,6 +57,24 @@ finally: os.remove(path) +def has_icasefs(): + # Stolen from mercurial.util + fd, path = tempfile.mkstemp(prefix=tempprefix) + os.close(fd) + try: + s1 = os.stat(path) + d, b = os.path.split(path) + p2 = os.path.join(d, b.upper()) + if path == p2: + p2 = os.path.join(d, b.lower()) + try: + s2 = os.stat(p2) + return s2 == s1 + except: + return False + finally: + os.remove(path) + def has_fifo(): return hasattr(os, "mkfifo") @@ -129,6 +147,7 @@ "fifo": (has_fifo, "named pipes"), "git": (has_git, "git command line client"), "hotshot": (has_hotshot, "python hotshot module"), + "icasefs": (has_icasefs, "case insensitive file system"), "lsprof": (has_lsprof, "python lsprof module"), "mtn": (has_mtn, "monotone client (> 0.31)"), "svn": (has_svn, "subversion client and admin tools"),