Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
spdlog
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Libraries
spdlog
Commits
bfc76278
Commit
bfc76278
authored
Oct 25, 2019
by
gabime
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update tests
parent
a1f28394
Changes
6
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
14 additions
and
3 deletions
+14
-3
build-branch/example/Debug/logs/mylog.txt
build-branch/example/Debug/logs/mylog.txt
+2
-0
build-branch/example/Debug/mylog.txt
build-branch/example/Debug/mylog.txt
+1
-0
build-branch/example/logs2/basic-log.txt
build-branch/example/logs2/basic-log.txt
+0
-0
build-branch/example/mylog.txt
build-branch/example/mylog.txt
+2
-0
build-branch/tests/Debug/test_logs/custom_err2.txt
build-branch/tests/Debug/test_logs/custom_err2.txt
+0
-1
tests/test_create_dir.cpp
tests/test_create_dir.cpp
+9
-2
No files found.
build-branch/example/Debug/logs/mylog.txt
0 → 100644
View file @
bfc76278
[2019-10-25 15:16:33.502] [LOGGER] [info] Hello
[2019-10-25 15:16:41.712] [LOGGER] [info] Hello
build-branch/example/Debug/mylog.txt
0 → 100644
View file @
bfc76278
[2019-10-25 15:16:58.845] [LOGGER] [info] Hello
build-branch/example/logs2/basic-log.txt
deleted
100644 → 0
View file @
a1f28394
build-branch/example/mylog.txt
0 → 100644
View file @
bfc76278
[2019-10-25 15:16:53.945] [LOGGER] [info] Hello
[2019-10-25 15:18:50.127] [LOGGER] [info] Hello
build-branch/tests/Debug/test_logs/custom_err2.txt
deleted
100644 → 0
View file @
a1f28394
This is async handler error message
\ No newline at end of file
tests/test_create_dir.cpp
View file @
bfc76278
...
@@ -13,7 +13,6 @@ bool try_create_dir(const char *path, const char *normalized_path)
...
@@ -13,7 +13,6 @@ bool try_create_dir(const char *path, const char *normalized_path)
return
file_exists
(
normalized_path
);
return
file_exists
(
normalized_path
);
}
}
#include "spdlog/sinks/stdout_color_sinks.h"
TEST_CASE
(
"create_dir"
,
"[create_dir]"
)
TEST_CASE
(
"create_dir"
,
"[create_dir]"
)
{
{
...
@@ -26,7 +25,7 @@ TEST_CASE("create_dir", "[create_dir]")
...
@@ -26,7 +25,7 @@ TEST_CASE("create_dir", "[create_dir]")
REQUIRE
(
try_create_dir
(
"test_logs/../test_logs/dir1/dir4"
,
"test_logs/dir1/dir4"
));
REQUIRE
(
try_create_dir
(
"test_logs/../test_logs/dir1/dir4"
,
"test_logs/dir1/dir4"
));
#ifdef WIN32
#ifdef WIN32
// test backslash
// test backslash
folder separator
REQUIRE
(
try_create_dir
(
"test_logs
\\
dir1
\\
dir222"
,
"test_logs
\\
dir1
\\
dir222"
));
REQUIRE
(
try_create_dir
(
"test_logs
\\
dir1
\\
dir222"
,
"test_logs
\\
dir1
\\
dir222"
));
REQUIRE
(
try_create_dir
(
"test_logs
\\
dir1
\\
dir223
\\
"
,
"test_logs
\\
dir1
\\
dir223
\\
"
));
REQUIRE
(
try_create_dir
(
"test_logs
\\
dir1
\\
dir223
\\
"
,
"test_logs
\\
dir1
\\
dir223
\\
"
));
REQUIRE
(
try_create_dir
(
".
\\
test_logs
\\
dir1
\\
dir2
\\
dir99
\\
..
\\
dir23"
,
"test_logs
\\
dir1
\\
dir2
\\
dir23"
));
REQUIRE
(
try_create_dir
(
".
\\
test_logs
\\
dir1
\\
dir2
\\
dir99
\\
..
\\
dir23"
,
"test_logs
\\
dir1
\\
dir2
\\
dir23"
));
...
@@ -45,13 +44,21 @@ TEST_CASE("dir_name", "[create_dir]")
...
@@ -45,13 +44,21 @@ TEST_CASE("dir_name", "[create_dir]")
REQUIRE
(
dir_name
(
R"(dir\)"
)
==
"dir"
);
REQUIRE
(
dir_name
(
R"(dir\)"
)
==
"dir"
);
REQUIRE
(
dir_name
(
R"(dir\\\)"
)
==
R"(dir\\)"
);
REQUIRE
(
dir_name
(
R"(dir\\\)"
)
==
R"(dir\\)"
);
REQUIRE
(
dir_name
(
R"(dir\file)"
)
==
"dir"
);
REQUIRE
(
dir_name
(
R"(dir\file)"
)
==
"dir"
);
REQUIRE
(
dir_name
(
R"(dir/file)"
)
==
"dir"
);
REQUIRE
(
dir_name
(
R"(dir\file.txt)"
)
==
"dir"
);
REQUIRE
(
dir_name
(
R"(dir\file.txt)"
)
==
"dir"
);
REQUIRE
(
dir_name
(
R"(dir/file)"
)
==
"dir"
);
REQUIRE
(
dir_name
(
R"(dir\file.txt\)"
)
==
R"(dir\file.txt)"
);
REQUIRE
(
dir_name
(
R"(dir\file.txt\)"
)
==
R"(dir\file.txt)"
);
REQUIRE
(
dir_name
(
R"(dir/file.txt/)"
)
==
R"(dir\file.txt)"
);
REQUIRE
(
dir_name
(
R"(\dir\file.txt)"
)
==
R"(\dir)"
);
REQUIRE
(
dir_name
(
R"(\dir\file.txt)"
)
==
R"(\dir)"
);
REQUIRE
(
dir_name
(
R"(/dir/file.txt)"
)
==
R"(\dir)"
);
REQUIRE
(
dir_name
(
R"(\\dir\file.txt)"
)
==
R"(\\dir)"
);
REQUIRE
(
dir_name
(
R"(\\dir\file.txt)"
)
==
R"(\\dir)"
);
REQUIRE
(
dir_name
(
R"(//dir/file.txt)"
)
==
R"(\\dir)"
);
REQUIRE
(
dir_name
(
R"(..\file.txt)"
)
==
".."
);
REQUIRE
(
dir_name
(
R"(..\file.txt)"
)
==
".."
);
REQUIRE
(
dir_name
(
R"(../file.txt)"
)
==
".."
);
REQUIRE
(
dir_name
(
R"(.\file.txt)"
)
==
"."
);
REQUIRE
(
dir_name
(
R"(.\file.txt)"
)
==
"."
);
REQUIRE
(
dir_name
(
R"(./file.txt)"
)
==
"."
);
REQUIRE
(
dir_name
(
R"(c:\\a\b\c\d\file.txt)"
)
==
R"(c:\\a\b\c\d)"
);
REQUIRE
(
dir_name
(
R"(c:\\a\b\c\d\file.txt)"
)
==
R"(c:\\a\b\c\d)"
);
REQUIRE
(
dir_name
(
R"(c://a/b/c/d/file.txt)"
)
==
R"(c:\\a\b\c\d)"
);
#else
#else
REQUIRE
(
dir_name
(
"dir/"
)
==
"dir"
);
REQUIRE
(
dir_name
(
"dir/"
)
==
"dir"
);
REQUIRE
(
dir_name
(
"dir///"
)
==
"dir//"
);
REQUIRE
(
dir_name
(
"dir///"
)
==
"dir//"
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment