summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEdward Thomson <ethomson@edwardthomson.com>2023-05-17 20:33:59 +0100
committerEdward Thomson <ethomson@edwardthomson.com>2023-05-17 20:33:59 +0100
commitad7b053fda2ed752e5baadef8f369425e583b7e9 (patch)
tree5608aa7a42eef477ce8c8e6091925a32d14e231d
parent6763314efd60cb22ba6095515e2f0aa80db78d35 (diff)
downloadlibgit2-ethomson/ssh_exec.tar.gz
-rw-r--r--tests/util/process/win32.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/tests/util/process/win32.c b/tests/util/process/win32.c
index e55b8be1a..914504d62 100644
--- a/tests/util/process/win32.c
+++ b/tests/util/process/win32.c
@@ -15,10 +15,10 @@ static git_str result;
void test_process_win32__cmdline_is_whitespace_delimited(void)
{
#ifdef GIT_WIN32
- char *one[] = { "one" };
- char *two[] = { "one", "two" };
- char *three[] = { "one", "two", "three" };
- char *four[] = { "one", "two", "three", "four" };
+ const char *one[] = { "one" };
+ const char *two[] = { "one", "two" };
+ const char *three[] = { "one", "two", "three" };
+ const char *four[] = { "one", "two", "three", "four" };
assert_cmdline("one", one);
assert_cmdline("one two", two);
@@ -30,9 +30,9 @@ void test_process_win32__cmdline_is_whitespace_delimited(void)
void test_process_win32__cmdline_escapes_whitespace(void)
{
#ifdef GIT_WIN32
- char *spaces[] = { "one with spaces" };
- char *tabs[] = { "one\twith\ttabs" };
- char *multiple[] = { "one with many spaces" };
+ const char *spaces[] = { "one with spaces" };
+ const char *tabs[] = { "one\twith\ttabs" };
+ const char *multiple[] = { "one with many spaces" };
assert_cmdline("one\" \"with\" \"spaces", spaces);
assert_cmdline("one\"\t\"with\"\t\"tabs", tabs);
@@ -43,7 +43,7 @@ void test_process_win32__cmdline_escapes_whitespace(void)
void test_process_win32__cmdline_escapes_quotes(void)
{
#ifdef GIT_WIN32
- char *one[] = { "echo", "\"hello world\"" };
+ const char *one[] = { "echo", "\"hello world\"" };
assert_cmdline("echo \\\"hello\" \"world\\\"", one);
#endif
@@ -52,8 +52,8 @@ void test_process_win32__cmdline_escapes_quotes(void)
void test_process_win32__cmdline_escapes_backslash(void)
{
#ifdef GIT_WIN32
- char *one[] = { "foo\\bar", "foo\\baz" };
- char *two[] = { "c:\\program files\\foo bar\\foo bar.exe", "c:\\path\\to\\other\\", "/a", "/b" };
+ const char *one[] = { "foo\\bar", "foo\\baz" };
+ const char *two[] = { "c:\\program files\\foo bar\\foo bar.exe", "c:\\path\\to\\other\\", "/a", "/b" };
assert_cmdline("foo\\\\bar foo\\\\baz", one);
assert_cmdline("c:\\\\program\" \"files\\\\foo\" \"bar\\\\foo\" \"bar.exe c:\\\\path\\\\to\\\\other\\\\ /a /b", two);