-
Notifications
You must be signed in to change notification settings - Fork 1.7k
V3/do not add newline to test body lines #3486
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
Open
hnakamur
wants to merge
28
commits into
owasp-modsecurity:v3/master
Choose a base branch
from
hnakamur:v3/do_not_add_newline_to_test_body_lines
base: v3/master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+25,318
−20,969
Open
Changes from all commits
Commits
Show all changes
28 commits
Select commit
Hold shift + click to select a range
a5a3db9
Do not add newline to test body Lines
hnakamur d7cad95
Add needed newlines in test request body lines or adjust tests
hnakamur e03f8a1
Replace CRLF to LF in test case JSON files
hnakamur b1c59b7
Add format subcommand to regression_test
hnakamur 488370c
Modify RegressionTest and use it for output formatted JSON
hnakamur 37e1f13
Update content-length in regeression_tests format subcommand
hnakamur 191dba9
Format regression test JSON files
hnakamur 9b49187
Update Content-Length in regression test JSON files
hnakamur aefd4a4
Adjust tests to pass after adding Content-Length
hnakamur 2ef033b
Make RegressionTests::toJSON method const
hnakamur 03c3e75
Do not shadow outer variable
hnakamur d8fd7d6
Use in-class initializer in ModSecurityTest
hnakamur 48fbc1b
Use a structured binding in regression_test.cc
hnakamur 1492841
Use emplace_back in regression_test.cc
hnakamur 8d5a80d
Use std::optional has_value to clarify the code
hnakamur 57689a0
Use unique_ptr in from_yajl_node in test/common/
hnakamur 2a84d52
Use default implementation for ModSecurityTest constructor
hnakamur c0fdf7b
Use std::any_of in has_chunked_header
hnakamur 22c7d78
Do not shadow variable
hnakamur cf46967
Reduce complexity in RegressionTest::from_yajl_node
hnakamur 550b0be
Reduce complexity more in RegressionTest::from_yajl_node
hnakamur 941e483
Update test/test-cases/regression/fn-setHostname.json
hnakamur c795b09
Set uri and method in regression/secruleengine.json
hnakamur f72106d
Make test clearer in regression/request-body-parser-multipart-crlf.json
hnakamur b8d37a0
Change superclass of ModSecurityTest to map for consistent order of o…
hnakamur edbd4b8
Change type of RegressionTests::tests to use unique_ptr
hnakamur af09a15
Add const for loop variable in regression_test.cc
hnakamur af3c0d0
Revert "Add const for loop variable in regression_test.cc"
hnakamur File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -14,7 +14,6 @@ | |
| */ | ||
|
|
||
| #include <iostream> | ||
| #include <unordered_map> | ||
| #include <vector> | ||
| #include <string> | ||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using the unordered_map key (
name) as the output path makes formatting behavior depend on how keys are constructed inload_test_json. Since you already setu->filename = fileduring load, it would be more robust to opentests[0]->filename(or the originalfilevalue) for writing, rather than relying on the map key.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I changed to use
std::mapinstead ofstd::unordered_mapfor consistent order of output at b8d37a0