Skip to content

Commit

Permalink
fix slash quoting issue
Browse files Browse the repository at this point in the history
  • Loading branch information
bhaller committed Jul 19, 2024
1 parent 8e8cabc commit 7bff127
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions eidos/eidos_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1536,7 +1536,7 @@ void _RunInternalFilesystemTests(void)
std::cerr << "Eidos_AbsolutePath(\"foo/bar.baz\")" << " : " << EIDOS_OUTPUT_FAILURE_TAG << " : raise during execution" << std::endl;
}

// Eidos_StripTrailingSlash(): remove a / or \ at the end of a path, pass everything else through
// Eidos_StripTrailingSlash(): remove a / or \\ at the end of a path, pass everything else through
try {
std::string result = Eidos_StripTrailingSlash("~/foo/foobar/");
if (result == "~/foo/foobar")
Expand All @@ -1552,17 +1552,17 @@ void _RunInternalFilesystemTests(void)
}

try {
std::string result = Eidos_StripTrailingSlash("~\foo\foobar\");
if (result == "~/foo/foobar")
std::string result = Eidos_StripTrailingSlash("~\\foo\\foobar\\");
if (result == "~\\foo\\foobar")
gEidosTestSuccessCount++;
else
{
gEidosTestFailureCount++;
std::cerr << "Eidos_StripTrailingSlash(\"~/foo/foobar/\")" << " : " << EIDOS_OUTPUT_FAILURE_TAG << " : incorrect result " << result << std::endl;
std::cerr << "Eidos_StripTrailingSlash(\"~\\foo\\foobar\\\")" << " : " << EIDOS_OUTPUT_FAILURE_TAG << " : incorrect result " << result << std::endl;
}
} catch (...) {
gEidosTestFailureCount++;
std::cerr << "Eidos_StripTrailingSlash(\"~/foo/foobar/\")" << " : " << EIDOS_OUTPUT_FAILURE_TAG << " : raise during execution" << std::endl;
std::cerr << "Eidos_StripTrailingSlash(\"~\\foo\\foobar\\\")" << " : " << EIDOS_OUTPUT_FAILURE_TAG << " : raise during execution" << std::endl;
}

try {
Expand Down

0 comments on commit 7bff127

Please sign in to comment.