aboutsummaryrefslogtreecommitdiff
path: root/src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp
diff options
context:
space:
mode:
authorRob Mensching <rob@firegiant.com>2025-10-15 23:08:38 -0700
committerRob Mensching <rob@firegiant.com>2025-10-15 23:12:35 -0700
commitdb34a02716e65759682f92052b7e5a5851ba7894 (patch)
tree418ab4cb5acf09e718ce8f82234f7eeb3eecb73f /src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp
parent90157a3799acc06ba094b9c445e50f459f3fd194 (diff)
downloadwix-db34a02716e65759682f92052b7e5a5851ba7894.tar.gz
wix-db34a02716e65759682f92052b7e5a5851ba7894.tar.bz2
wix-db34a02716e65759682f92052b7e5a5851ba7894.zip
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.
Diffstat (limited to 'src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp')
-rw-r--r--src/libs/dutil/test/DUtilUnitTest/FileUtilTest.cpp74
1 files changed, 37 insertions, 37 deletions
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
11 public ref class FileUtil 11 public ref class FileUtil
12 { 12 {
13 public: 13 public:
14 [Fact(Skip="Skipped until we have a good way to reference ANSI.txt.")] 14 // [Fact(Skip="Skipped until we have a good way to reference ANSI.txt.")]
15 void FileUtilTest() 15 // void FileUtilTest()
16 { 16 // {
17 HRESULT hr = S_OK; 17 // HRESULT hr = S_OK;
18 LPWSTR sczTempDir = NULL; 18 // LPWSTR sczTempDir = NULL;
19 LPWSTR sczFileDir = NULL; 19 // LPWSTR sczFileDir = NULL;
20 20
21 DutilInitialize(&DutilTestTraceError); 21 // DutilInitialize(&DutilTestTraceError);
22 22
23 try 23 // try
24 { 24 // {
25 hr = PathExpand(&sczTempDir, L"%TEMP%\\FileUtilTest\\", PATH_EXPAND_ENVIRONMENT); 25 // hr = PathExpand(&sczTempDir, L"%TEMP%\\FileUtilTest\\", PATH_EXPAND_ENVIRONMENT);
26 NativeAssert::Succeeded(hr, "Failed to get temp dir"); 26 // NativeAssert::Succeeded(hr, "Failed to get temp dir");
27 27
28 hr = PathExpand(&sczFileDir, L"%WIX_ROOT%\\examples\\data\\TextEncodings\\", PATH_EXPAND_ENVIRONMENT); 28 // hr = PathExpand(&sczFileDir, L"%WIX_ROOT%\\examples\\data\\TextEncodings\\", PATH_EXPAND_ENVIRONMENT);
29 NativeAssert::Succeeded(hr, "Failed to get path to encodings file dir"); 29 // NativeAssert::Succeeded(hr, "Failed to get path to encodings file dir");
30 30
31 hr = DirEnsureExists(sczTempDir, NULL); 31 // hr = DirEnsureExists(sczTempDir, NULL);
32 NativeAssert::Succeeded(hr, "Failed to ensure directory exists: {0}", sczTempDir); 32 // NativeAssert::Succeeded(hr, "Failed to ensure directory exists: {0}", sczTempDir);
33 33
34 TestFile(sczFileDir, sczTempDir, L"ANSI.txt", 32, FILE_ENCODING_UTF8); 34 // TestFile(sczFileDir, sczTempDir, L"ANSI.txt", 32, FILE_ENCODING_UTF8);
35 // Big endian not supported today! 35 // // Big endian not supported today!
36 //TestFile(sczFileDir, L"UnicodeBENoBOM.txt", 34); 36 // //TestFile(sczFileDir, L"UnicodeBENoBOM.txt", 34);
37 //TestFile(sczFileDir, L"UnicodeBEWithBOM.txt", 34); 37 // //TestFile(sczFileDir, L"UnicodeBEWithBOM.txt", 34);
38 TestFile(sczFileDir, sczTempDir, L"UnicodeLENoBOM.txt", 34, FILE_ENCODING_UTF16); 38 // TestFile(sczFileDir, sczTempDir, L"UnicodeLENoBOM.txt", 34, FILE_ENCODING_UTF16);
39 TestFile(sczFileDir, sczTempDir, L"UnicodeLEWithBOM.txt", 34, FILE_ENCODING_UTF16_WITH_BOM); 39 // TestFile(sczFileDir, sczTempDir, L"UnicodeLEWithBOM.txt", 34, FILE_ENCODING_UTF16_WITH_BOM);
40 TestFile(sczFileDir, sczTempDir, L"UTF8WithSignature.txt", 34, FILE_ENCODING_UTF8_WITH_BOM); 40 // TestFile(sczFileDir, sczTempDir, L"UTF8WithSignature.txt", 34, FILE_ENCODING_UTF8_WITH_BOM);
41 41
42 hr = DirEnsureDelete(sczTempDir, TRUE, TRUE); 42 // hr = DirEnsureDelete(sczTempDir, TRUE, TRUE);
43 } 43 // }
44 finally 44 // finally
45 { 45 // {
46 ReleaseStr(sczTempDir); 46 // ReleaseStr(sczTempDir);
47 ReleaseStr(sczFileDir); 47 // ReleaseStr(sczFileDir);
48 DutilUninitialize(); 48 // DutilUninitialize();
49 } 49 // }
50 } 50 // }
51 51
52 private: 52 private:
53 void TestFile(LPWSTR wzDir, LPCWSTR wzTempDir, LPWSTR wzFileName, size_t cbExpectedStringLength, FILE_ENCODING feExpectedEncoding) 53 void TestFile(LPWSTR wzDir, LPCWSTR wzTempDir, LPWSTR wzFileName, size_t cbExpectedStringLength, FILE_ENCODING feExpectedEncoding)