summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.c')
-rw-r--r--src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.c71
1 files changed, 0 insertions, 71 deletions
diff --git a/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.c b/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.c
deleted file mode 100644
index d8a81746b6..0000000000
--- a/src/pal/tests/palsuite/miscellaneous/GetCommandLineW/test1/test.c
+++ /dev/null
@@ -1,71 +0,0 @@
-// Licensed to the .NET Foundation under one or more agreements.
-// The .NET Foundation licenses this file to you under the MIT license.
-// See the LICENSE file in the project root for more information.
-
-/*============================================================
-**
-** Source : test.c
-**
-** Purpose: Test for GetCommandLineW() function
-**
-**
-**=========================================================*/
-
-#define UNICODE
-#include <palsuite.h>
-
-int __cdecl main(int argc, char *argv[])
-{
-
- LPWSTR TheResult = NULL;
- WCHAR *CommandLine;
- int i;
- WCHAR * p;
-
- /*
- * Initialize the PAL and return FAILURE if this fails
- */
-
- if(0 != (PAL_Initialize(argc, argv)))
- {
- return FAIL;
- }
-
- CommandLine = malloc(1024);
- wcscpy(CommandLine,convert(argv[0]));
-
- for(i=1;i<argc;++i)
- {
- wcscat(CommandLine,convert(" "));
- wcscat(CommandLine,convert(argv[i]));
- }
-
- TheResult = GetCommandLine();
-
- /* If it is NULL, it failed. */
- if(TheResult == NULL)
- {
- Fail("ERROR: The command line returned was NULL -- but should be "
- "a LPWSTR.");
- }
-
- // It's ok that if there is trailing white spaces in "TheResult"
- // Let's trim them.
- p = TheResult + wcslen(TheResult) - 1;
- while (* p == L' ' || * p == L'\t') { printf("%c\n", *p); * p-- = 0 ; }
-
- if(memcmp(TheResult,CommandLine,wcslen(TheResult)*2+2) != 0)
- {
- Fail("ERROR: The command line returned was %s instead of %s "
- "which was the command.\n",
- convertC(TheResult), convertC(CommandLine));
- }
-
- free(CommandLine);
-
- PAL_Terminate();
- return PASS;
-
-}
-
-