Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/libgit2.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@microsoft.com>2015-02-03 20:16:11 +0300
committerEdward Thomson <ethomson@microsoft.com>2015-02-03 20:23:04 +0300
commit5f28ec84a10b283f79f027f83ba03d7774a987f7 (patch)
tree24c984e209167b7b9b09cdd950aa7a0ca939e951 /tests/path
parent9dcc4a36f709f013ed111924754021fddfc933e6 (diff)
win32: cleanup 8.3 disabled tests
Diffstat (limited to 'tests/path')
-rw-r--r--tests/path/win32.c23
1 files changed, 7 insertions, 16 deletions
diff --git a/tests/path/win32.c b/tests/path/win32.c
index 63c19e3e1..41831a88c 100644
--- a/tests/path/win32.c
+++ b/tests/path/win32.c
@@ -4,18 +4,6 @@
#ifdef GIT_WIN32
#include "win32/path_w32.h"
-
-static bool is_8dot3_disabled(void)
-{
- wchar_t shortPath[MAX_PATH];
- wchar_t *dest = L"longer_than_8dot3";
- FILE *fp = _wfopen(dest, L"w");
- cl_assert(fp);
- fclose(fp);
- cl_assert(GetShortPathNameW(dest, shortPath, MAX_PATH) > 0);
- DeleteFileW(dest);
- return !wcscmp(dest, shortPath);
-}
#endif
void test_utf8_to_utf16(const char *utf8_in, const wchar_t *utf16_expected)
@@ -205,11 +193,14 @@ void test_path_win32__8dot3_name(void)
{
#ifdef GIT_WIN32
char *shortname;
- bool disable8dot3 = is_8dot3_disabled();
/* Some guaranteed short names */
shortname = git_win32_path_8dot3_name("C:\\Program Files");
- cl_assert(!shortname || !strcmp(shortname, "PROGRA~1")); // null when 8.3 stripped, otherwise in 8.3 format
+
+ if (shortname == NULL)
+ clar__skip();
+
+ cl_assert_equal_s("PROGRA~1", shortname);
git__free(shortname);
cl_assert_equal_s("WINDOWS", (shortname = git_win32_path_8dot3_name("C:\\WINDOWS")));
@@ -217,12 +208,12 @@ void test_path_win32__8dot3_name(void)
/* Create some predictible short names */
cl_must_pass(p_mkdir(".foo", 0777));
- cl_assert_equal_s(disable8dot3 ? ".foo" : "FOO~1", (shortname = git_win32_path_8dot3_name(".foo")));
+ cl_assert_equal_s("FOO~1", (shortname = git_win32_path_8dot3_name(".foo")));
git__free(shortname);
cl_git_write2file("bar~1", "foobar\n", 7, O_RDWR|O_CREAT, 0666);
cl_must_pass(p_mkdir(".bar", 0777));
- cl_assert_equal_s(disable8dot3 ? ".bar" : "BAR~2", (shortname = git_win32_path_8dot3_name(".bar")));
+ cl_assert_equal_s("BAR~2", (shortname = git_win32_path_8dot3_name(".bar")));
git__free(shortname);
#endif
}