diff options
| author | Ruslan Teliuk <ruslantproductengine@lindenlab.com> | 2016-10-11 16:21:01 +0300 |
|---|---|---|
| committer | Ruslan Teliuk <ruslantproductengine@lindenlab.com> | 2016-10-11 16:21:01 +0300 |
| commit | a47896f4b917340fe6e27fd0687275c38dbad401 (patch) | |
| tree | e0ec1292a8e19206cb42741d1054516ea09cd09f /indra/llcommon/tests/llerror_test.cpp | |
| parent | 6e6f2c8f5bf7bb3326140b17e23471283fff75b1 (diff) | |
| parent | f5fcf54cd9e1356e33a629eaaf1602319e5da8df (diff) | |
Merged lindenlab/viewer-neko into default
Diffstat (limited to 'indra/llcommon/tests/llerror_test.cpp')
| -rw-r--r-- | indra/llcommon/tests/llerror_test.cpp | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/indra/llcommon/tests/llerror_test.cpp b/indra/llcommon/tests/llerror_test.cpp index f51279e817..8bace8ac41 100644 --- a/indra/llcommon/tests/llerror_test.cpp +++ b/indra/llcommon/tests/llerror_test.cpp @@ -237,8 +237,21 @@ namespace tut void ErrorTestObject::test<4>() // file abbreviation { - std::string thisFile = __FILE__; - std::string abbreviateFile = LLError::abbreviateFile(thisFile); + std::string prev, abbreviateFile = __FILE__; + do + { + prev = abbreviateFile; + abbreviateFile = LLError::abbreviateFile(abbreviateFile); + // __FILE__ is assumed to end with + // indra/llcommon/tests/llerror_test.cpp. This test used to call + // abbreviateFile() exactly once, then check below whether it + // still contained the string 'indra'. That fails if the FIRST + // part of the pathname also contains indra! Certain developer + // machine images put local directory trees under + // /ngi-persist/indra, which is where we observe the problem. So + // now, keep calling abbreviateFile() until it returns its + // argument unchanged, THEN check. + } while (abbreviateFile != prev); ensure_ends_with("file name abbreviation", abbreviateFile, |
