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

#989: Trim script class and import script options #465

Merged
merged 5 commits into from
Oct 22, 2024

Conversation

tomuben
Copy link
Collaborator

@tomuben tomuben commented Oct 21, 2024

Comment on lines 15 to 32
inline void ltrim(std::string &s) {
s.erase(s.begin(), std::find_if(s.begin(), s.end(), [](unsigned char ch) {
return !std::isspace(ch);
}));
}


inline void rtrim(std::string &s) {
s.erase(std::find_if(s.rbegin(), s.rend(), [](unsigned char ch) {
return !std::isspace(ch);
}).base(), s.end());
}

inline void trim(std::string &s) {
ltrim(s);
rtrim(s);
}
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Collaborator

@tkilias tkilias Oct 22, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add the link as comment

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@tomuben tomuben force-pushed the bug/989_trim_scriptclass_and_import_script_options branch from 235772a to 1691e48 Compare October 21, 2024 19:15
@@ -156,6 +199,47 @@ TEST(JavaContainer, simple_import_script) {
EXPECT_EQ(vm.getJavaVMInternalStatus().m_jvmOptions, expectedJVMOptions);
}

TEST(JavaContainer, simple_import_script_with_white_space) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

does it make sense also to add a test with a quoted import script, because it is legal

@tomuben tomuben force-pushed the bug/989_trim_scriptclass_and_import_script_options branch from 2adeb77 to f552241 Compare October 22, 2024 13:23
@tomuben tomuben merged commit 47f6973 into master Oct 22, 2024
23 of 24 checks passed
@tomuben tomuben deleted the bug/989_trim_scriptclass_and_import_script_options branch October 22, 2024 13:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants