diff options
author | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-06-19 12:50:46 -0700 |
---|---|---|
committer | Nicolas Noble <nicolasnoble@users.noreply.github.com> | 2015-06-19 12:50:46 -0700 |
commit | 3acc428ffd353d340f83f8ae70b1a98299845031 (patch) | |
tree | c98881be351a825a5beb7a27ee861b3083d87499 /test | |
parent | 61a25fbff7be2915c50db154895a984f240ef6c7 (diff) | |
parent | d1eb527f78bbe962b02871e54c917b6c4dc984e2 (diff) |
Merge pull request #2072 from jtattermusch/fix_json_rewrite_test
fix json_rewrite_test CRLF handling
Diffstat (limited to 'test')
-rw-r--r-- | test/core/json/json_rewrite_test.c | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/test/core/json/json_rewrite_test.c b/test/core/json/json_rewrite_test.c index ec6deebe76..f5859322ea 100644 --- a/test/core/json/json_rewrite_test.c +++ b/test/core/json/json_rewrite_test.c @@ -64,6 +64,11 @@ typedef struct json_reader_userdata { static void json_writer_output_char(void* userdata, char c) { json_writer_userdata* state = userdata; int cmp = fgetc(state->cmp); + + /* treat CRLF as LF */ + if (cmp == '\r' && c == '\n') { + cmp = fgetc(state->cmp); + } GPR_ASSERT(cmp == c); } |