From d1b5fd27aa94cca0bacff1a2afe359b1b59c759b Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Fri, 10 Dec 2021 16:16:45 +0000 Subject: [PATCH] Enable long path normalization test by default It seems that the default value of NtfsDisable8dot3NameCreation registry value is 2, and not 0, since a very long time (at least Windows 7), so the wxPATH_NORM_LONG test was never actually executed. Change the check guarding it to check if the value of the key is different from 1 instead of checking that it is 0, as the test can still succeed on the systems where this is the case. Of course, it can also fail, if short names are disabled for the current volume, but let's see if this is a problem in practice before doing something more complicated to deal with this case. --- tests/filename/filenametest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/filename/filenametest.cpp b/tests/filename/filenametest.cpp index 64b1ed49cf..8c4c591ac4 100644 --- a/tests/filename/filenametest.cpp +++ b/tests/filename/filenametest.cpp @@ -380,7 +380,7 @@ TEST_CASE("wxFileName::Normalize", "[filename]") wxRegKey::HKLM, "SYSTEM\\CurrentControlSet\\Control\\FileSystem" ).QueryValue("NtfsDisable8dot3NameCreation", &shortNamesDisabled) && - !shortNamesDisabled ) + shortNamesDisabled != 1 ) { wxFileName fn("TESTDA~1.CON"); CHECK( fn.Normalize(wxPATH_NORM_LONG, cwd) );