mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-12-15 02:41:59 +00:00
97f2a2213e
* Move some code outside dbms/src folder * Fix paths
21 lines
505 B
C++
21 lines
505 B
C++
#include <gtest/gtest.h>
|
|
|
|
#include <Disks/IDisk.h>
|
|
|
|
|
|
TEST(DiskTest, parentPath)
|
|
{
|
|
EXPECT_EQ("", DB::parentPath("test_dir/"));
|
|
EXPECT_EQ("test_dir/", DB::parentPath("test_dir/nested_dir/"));
|
|
EXPECT_EQ("test_dir/", DB::parentPath("test_dir/nested_file"));
|
|
}
|
|
|
|
|
|
TEST(DiskTest, fileName)
|
|
{
|
|
EXPECT_EQ("test_file", DB::fileName("test_file"));
|
|
EXPECT_EQ("nested_file", DB::fileName("test_dir/nested_file"));
|
|
EXPECT_EQ("", DB::fileName("test_dir/"));
|
|
EXPECT_EQ("", DB::fileName(""));
|
|
}
|