diff options
author | Jan Tattermusch <jtattermusch@google.com> | 2015-06-15 18:29:23 -0700 |
---|---|---|
committer | Jan Tattermusch <jtattermusch@google.com> | 2015-06-15 18:29:23 -0700 |
commit | bc745a5f4e30590cdcba1c600b51e4e9d38ad360 (patch) | |
tree | dfd0a4a768622b2510027488d483b87a52852b91 /test | |
parent | 12e8a049e4d7b7f52baaf72604a093fdc3612120 (diff) |
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..fa46830d5b 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); } |