summaryrefslogtreecommitdiff
path: root/src/pal/tests/palsuite/c_runtime/_splitpath
diff options
context:
space:
mode:
Diffstat (limited to 'src/pal/tests/palsuite/c_runtime/_splitpath')
-rw-r--r--src/pal/tests/palsuite/c_runtime/_splitpath/CMakeLists.txt4
-rw-r--r--src/pal/tests/palsuite/c_runtime/_splitpath/test1/CMakeLists.txt19
-rw-r--r--src/pal/tests/palsuite/c_runtime/_splitpath/test1/test1.c108
-rw-r--r--src/pal/tests/palsuite/c_runtime/_splitpath/test1/testinfo.dat15
4 files changed, 0 insertions, 146 deletions
diff --git a/src/pal/tests/palsuite/c_runtime/_splitpath/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/_splitpath/CMakeLists.txt
deleted file mode 100644
index f6aa0cb2d9..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_splitpath/CMakeLists.txt
+++ /dev/null
@@ -1,4 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-add_subdirectory(test1)
-
diff --git a/src/pal/tests/palsuite/c_runtime/_splitpath/test1/CMakeLists.txt b/src/pal/tests/palsuite/c_runtime/_splitpath/test1/CMakeLists.txt
deleted file mode 100644
index 361b9084d7..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_splitpath/test1/CMakeLists.txt
+++ /dev/null
@@ -1,19 +0,0 @@
-cmake_minimum_required(VERSION 2.8.12.2)
-
-set(CMAKE_INCLUDE_CURRENT_DIR ON)
-
-set(SOURCES
- test1.c
-)
-
-add_executable(paltest_splitpath_test1
- ${SOURCES}
-)
-
-add_dependencies(paltest_splitpath_test1 coreclrpal)
-
-target_link_libraries(paltest_splitpath_test1
- pthread
- m
- coreclrpal
-)
diff --git a/src/pal/tests/palsuite/c_runtime/_splitpath/test1/test1.c b/src/pal/tests/palsuite/c_runtime/_splitpath/test1/test1.c
deleted file mode 100644
index e98354c2ee..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_splitpath/test1/test1.c
+++ /dev/null
@@ -1,108 +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: test1.c
-**
-** Purpose: Passes _splitpath() a series of sample paths and checks that it
-** parses them as expected.
-**
-**
-**==========================================================================*/
-
-
-#include <palsuite.h>
-
-struct testCase
-{
- const char path[_MAX_PATH]; /* The path to parse. */
- const char drive[_MAX_DRIVE]; /* The expected values... */
- const char dir[_MAX_DIR];
- const char fname[_MAX_FNAME];
- const char ext[_MAX_EXT];
-};
-
-
-int __cdecl main(int argc, char **argv)
-{
- struct testCase testCases[] =
- {
-#if WIN32
- {"c:\\foo\\bar\\foo.bar", "c:", "\\foo\\bar\\", "foo", ".bar"},
- {"c:/foo/bar/foo.bar", "c:", "/foo/bar/", "foo", ".bar"},
- {"c:/foo/bar/foo", "c:", "/foo/bar/", "foo", ""},
- {"c:/foo/bar/.bar", "c:", "/foo/bar/", "", ".bar"},
- {"c:/foo/bar/", "c:", "/foo/bar/", "", ""},
- {"/foo/bar/foo.bar", "", "/foo/bar/", "foo", ".bar"},
- {"c:foo.bar", "c:", "", "foo", ".bar"}
-#else
- {"c:\\foo\\bar\\foo.bar", "","c:/foo/bar/", "foo", ".bar"},
- {"c:/foo/bar/foo.bar", "", "c:/foo/bar/", "foo", ".bar"},
- {"c:/foo/bar/foo", "", "c:/foo/bar/", "foo", ""},
- {"c:/foo/bar/.bar", "", "c:/foo/bar/", ".bar", ""},
- {"c:/foo/bar/", "", "c:/foo/bar/", "", ""},
- {"/foo/bar/foo.bar", "", "/foo/bar/", "foo", ".bar"},
- {"c:foo.bar", "", "", "c:foo", ".bar"}
-#endif
- };
- char drive[_MAX_DRIVE];
- char dir[_MAX_DIR];
- char fname[_MAX_FNAME];
- char ext[_MAX_EXT];
-
- int i=0;
-
- /*
- * Initialize the PAL and return FAIL if this fails
- */
- if (0 != (PAL_Initialize(argc, argv)))
- {
- return FAIL;
- }
-
- for (i = 0; i < sizeof(testCases)/sizeof(struct testCase); i++)
- {
- _splitpath(testCases[i].path, drive, dir, fname, ext);
-
-
- /*on platforms that don't support drive letters, the drive
- returned should always be "" */
- if (strcmp(drive, testCases[i].drive) != 0)
- {
- Fail("_splitpath read the path \"%s\" and thought the drive was "
- "\"%s\" instead of \"%s\"\n"
- , testCases[i].path, drive, testCases[i].drive);
- }
-
- if (strcmp(dir, testCases[i].dir) != 0)
- {
- Fail("_splitpath read the path \"%s\" and thought the directory "
- "was \"%s\" instead of \"%s\"\n"
- , testCases[i].path, dir, testCases[i].dir);
- }
-
- if (strcmp(fname, testCases[i].fname) != 0)
- {
- Fail("_splitpath read the path \"%s\" and thought the filename "
- "was \"%s\" instead of \"%s\"\n"
- , testCases[i].path, fname, testCases[i].fname);
- }
-
- if (strcmp(ext, testCases[i].ext) != 0)
- {
- Fail("_splitpath read the path \"%s\" and thought the file "
- "extension was \"%s\" instead of \"%s\"\n"
- , testCases[i].path, ext, testCases[i].ext);
- }
- }
- PAL_Terminate();
- return PASS;
-}
-
-
-
-
-
-
diff --git a/src/pal/tests/palsuite/c_runtime/_splitpath/test1/testinfo.dat b/src/pal/tests/palsuite/c_runtime/_splitpath/test1/testinfo.dat
deleted file mode 100644
index 0a93e27456..0000000000
--- a/src/pal/tests/palsuite/c_runtime/_splitpath/test1/testinfo.dat
+++ /dev/null
@@ -1,15 +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.
-
-Version = 1.0
-Section = C Runtime
-Function = _splitpath
-Name = Positive Test for _splitpath
-TYPE = DEFAULT
-EXE1 = test1
-Description
-= Passes _splitpath() a series of sample paths and checks that it
-= parses them as expected.
-
-