Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[12_12] Improve test title for load_string #218

Merged
merged 1 commit into from
Nov 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 6 additions & 6 deletions tests/System/Files/file_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ TEST_CASE ("read_directory") {
CHECK (flag2); // error
}

TEST_CASE ("load empty file") {
TEST_CASE ("load_string from empty file") {
url lolly_tmp= get_lolly_tmp ();
url u1 = lolly_tmp * url ("load_empty.txt");
string s1;
Expand All @@ -237,7 +237,7 @@ TEST_CASE ("load empty file") {
CHECK_EQ (s1 == string (""), true);
}

TEST_CASE ("load_string part1") {
TEST_CASE ("load_string from newly created file") {
url lolly_tmp= get_lolly_tmp ();
url u1 = lolly_tmp * url ("load_string_1.txt");
c_string s1 (as_string (u1));
Expand Down Expand Up @@ -269,7 +269,7 @@ TEST_CASE ("load_string part1") {

TEST_MEMORY_LEAK_ALL

TEST_CASE ("load_string part2") {
TEST_CASE ("load_string from 3 local files and check exception") {
url lolly_tmp= get_lolly_tmp ();
url u1 = url_pwd () * url ("tests/System/Files/sample_file.txt");
url u2= url_pwd () * url ("tests/System/Files/sample_file_copy.txt");
Expand All @@ -284,15 +284,15 @@ TEST_CASE ("load_string part2") {
// because exception throw, some object will not be released.
TEST_MEMORY_LEAK_RESET

TEST_CASE ("load_string part3") {
TEST_CASE ("load_string from url with :") {
url u ("tests/Kernel/Containers:tests/Kernel/Types", "list_test.cpp");
string s;
load_string (u, s, false);
CHECK (N (s) > 0);
}

#if defined(OS_MINGW) || defined(OS_WIN)
TEST_CASE ("load_string part 4: read only file") {
TEST_CASE ("load_string from read only file") {
url hosts= url_system ("C:\\Windows\\System32\\drivers\\etc\\hosts");
string s;
load_string (hosts, s, false);
Expand All @@ -301,7 +301,7 @@ TEST_CASE ("load_string part 4: read only file") {
#endif

#if defined(OS_LINUX) || defined(OS_MACOS)
TEST_CASE ("load_string part 4: read only file") {
TEST_CASE ("load_string from read only file") {
url hosts= url_system ("/etc/hosts");
string s;
load_string (hosts, s, false);
Expand Down
Loading