From 834af9c18f18d455bf8ca93ca69bbeccf23bedb5 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 15 Oct 2025 23:08:38 -0700 Subject: Comment out skipped tests to avoid "error messages" In C++/CLI skipped xUnit tests are skipped but they print out their skip message as red error messages. That's very scary and the bug is known in xUnit so for now the easiest workaround is to comment out the skipped tests. --- src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp | 74 +++++++++++----------- 1 file changed, 37 insertions(+), 37 deletions(-) (limited to 'src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp') diff --git a/src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp b/src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp index 8ea045f5..80fe2f1a 100644 --- a/src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp +++ b/src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp @@ -11,43 +11,43 @@ namespace DutilTests public ref class FileUtil { public: - [Fact(Skip="Skipped until we have a good way to reference ANSI.txt.")] - void FileUtilTest() - { - HRESULT hr = S_OK; - LPWSTR sczTempDir = NULL; - LPWSTR sczFileDir = NULL; - - DutilInitialize(&DutilTestTraceError); - - try - { - hr = PathExpand(&sczTempDir, L"%TEMP%\\FileUtilTest\\", PATH_EXPAND_ENVIRONMENT); - NativeAssert::Succeeded(hr, "Failed to get temp dir"); - - hr = PathExpand(&sczFileDir, L"%WIX_ROOT%\\examples\\data\\TextEncodings\\", PATH_EXPAND_ENVIRONMENT); - NativeAssert::Succeeded(hr, "Failed to get path to encodings file dir"); - - hr = DirEnsureExists(sczTempDir, NULL); - NativeAssert::Succeeded(hr, "Failed to ensure directory exists: {0}", sczTempDir); - - TestFile(sczFileDir, sczTempDir, L"ANSI.txt", 32, FILE_ENCODING_UTF8); - // Big endian not supported today! - //TestFile(sczFileDir, L"UnicodeBENoBOM.txt", 34); - //TestFile(sczFileDir, L"UnicodeBEWithBOM.txt", 34); - TestFile(sczFileDir, sczTempDir, L"UnicodeLENoBOM.txt", 34, FILE_ENCODING_UTF16); - TestFile(sczFileDir, sczTempDir, L"UnicodeLEWithBOM.txt", 34, FILE_ENCODING_UTF16_WITH_BOM); - TestFile(sczFileDir, sczTempDir, L"UTF8WithSignature.txt", 34, FILE_ENCODING_UTF8_WITH_BOM); - - hr = DirEnsureDelete(sczTempDir, TRUE, TRUE); - } - finally - { - ReleaseStr(sczTempDir); - ReleaseStr(sczFileDir); - DutilUninitialize(); - } - } + // [Fact(Skip="Skipped until we have a good way to reference ANSI.txt.")] + // void FileUtilTest() + // { + // HRESULT hr = S_OK; + // LPWSTR sczTempDir = NULL; + // LPWSTR sczFileDir = NULL; + + // DutilInitialize(&DutilTestTraceError); + + // try + // { + // hr = PathExpand(&sczTempDir, L"%TEMP%\\FileUtilTest\\", PATH_EXPAND_ENVIRONMENT); + // NativeAssert::Succeeded(hr, "Failed to get temp dir"); + + // hr = PathExpand(&sczFileDir, L"%WIX_ROOT%\\examples\\data\\TextEncodings\\", PATH_EXPAND_ENVIRONMENT); + // NativeAssert::Succeeded(hr, "Failed to get path to encodings file dir"); + + // hr = DirEnsureExists(sczTempDir, NULL); + // NativeAssert::Succeeded(hr, "Failed to ensure directory exists: {0}", sczTempDir); + + // TestFile(sczFileDir, sczTempDir, L"ANSI.txt", 32, FILE_ENCODING_UTF8); + // // Big endian not supported today! + // //TestFile(sczFileDir, L"UnicodeBENoBOM.txt", 34); + // //TestFile(sczFileDir, L"UnicodeBEWithBOM.txt", 34); + // TestFile(sczFileDir, sczTempDir, L"UnicodeLENoBOM.txt", 34, FILE_ENCODING_UTF16); + // TestFile(sczFileDir, sczTempDir, L"UnicodeLEWithBOM.txt", 34, FILE_ENCODING_UTF16_WITH_BOM); + // TestFile(sczFileDir, sczTempDir, L"UTF8WithSignature.txt", 34, FILE_ENCODING_UTF8_WITH_BOM); + + // hr = DirEnsureDelete(sczTempDir, TRUE, TRUE); + // } + // finally + // { + // ReleaseStr(sczTempDir); + // ReleaseStr(sczFileDir); + // DutilUninitialize(); + // } + // } private: void TestFile(LPWSTR wzDir, LPCWSTR wzTempDir, LPWSTR wzFileName, size_t cbExpectedStringLength, FILE_ENCODING feExpectedEncoding) -- cgit v1.2.3-55-g6feb