Mercurial > projects > mde
diff mde/setup/paths.d @ 68:3a737e06dc50
Unittests: fixes and changes. Plus some doc changes.
author | Diggory Hardy <diggory.hardy@gmail.com> |
---|---|
date | Fri, 04 Jul 2008 18:49:16 +0100 |
parents | 108d123238c0 |
children | 25cb7420dc91 |
line wrap: on
line diff
--- a/mde/setup/paths.d Thu Jul 03 12:40:31 2008 +0100 +++ b/mde/setup/paths.d Fri Jul 04 18:49:16 2008 +0100 @@ -131,6 +131,18 @@ readOrder == PRIORITY.HIGH_ONLY ); } body { FilePath[] ret; + + debug (mdeUnitTest) { + /* Alternate approach - just try from current directory. + * Really just for unittests, but with the if condition it shouldn't break anything else. */ + if (pathsLen == 0) { + FilePath file = findFile (filename); + if (file !is null) + ret ~= file; + return ret; + } + } + if (readOrder == PRIORITY.LOW_HIGH) { for (size_t i = 0; i < pathsLen; ++i) { FilePath file = findFile (paths[i]~filename);