VirtualBox

Changeset 95044 in vbox for trunk


Ignore:
Timestamp:
May 19, 2022 3:43:57 PM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
151506
Message:

IPRT/testcase: tstUtf8: Skip the string comparison on older Windows OSes like NT4 in testNoTranslation().

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/testcase/tstUtf8.cpp

    r95043 r95044  
    15041504        RTTestIPrintf(RTTESTLVL_ALWAYS, "CurrentCP is UTF-8 or similar (LC_ALL=%s LANG=%s LC_CTYPE=%s)\n",
    15051505                      RTEnvGet("LC_ALL"), RTEnvGet("LANG"), RTEnvGet("LC_CTYPE"));
    1506         if (strcmp(pszOut, pszTest1))
    1507             RTTestFailed(hTest, "mismatch\nutf8: %.*Rhxs\n got: %.*Rhxs\n", strlen(pszTest1), pszTest1, strlen(pszOut), pszOut);
     1506#ifdef RT_OS_WINDOWS
     1507        if (uACP == 65001 /* UTF-8 */)
     1508        {
     1509            /* The following string comparison will fail if the active ACP isn't UTF-8 (65001), so skip this then.
     1510             * This applies to older Windows OSes like NT4. */
     1511#endif
     1512            if (strcmp(pszOut, pszTest1))
     1513                RTTestFailed(hTest, "mismatch\nutf8: %.*Rhxs\n got: %.*Rhxs\n", strlen(pszTest1), pszTest1, strlen(pszOut), pszOut);
     1514#ifdef RT_OS_WINDOWS
     1515        }
     1516#endif
    15081517        RTStrFree(pszOut);
    15091518    }
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette