Repository: toml-rs/toml (language: rust)

Issue:
Test with raw multiline string is failing on Windows  
```---- test_raw_multiline_string stdout ----
        thread 'test_raw_multiline_string' panicked at 'assertion failed: `(left == right)`
  left: `Object({"firstnl": Object({"type": String("string"), "value": String("This string has a \' quote character.")}), "multiline": Object({"type": String("string"), "value": String("This string\nhas \' a quote character\nand more than\none newline\nin it.")}), "oneline": Object({"type": String("string"), "value": String("This string has a \' quote character.")})})`,
 right: `Object({"firstnl": Object({"type": String("string"), "value": String("This string has a \' quote character.")}), "multiline": Object({"type": String("string"), "value": String("This string\r\nhas \' a quote character\r\nand more than\r\none newline\r\nin it.")}), "oneline": Object({"type": String("string"), "value": String("This string has a \' quote character.")})})`', tests\test_valid.rs:54:4
note: Run with `RUST_BACKTRACE=1` for a backtrace.
```
reported by @Boddlnagg in [comment](https://github.com/ordian/toml_edit/pull/21#issuecomment-320439900)


Discussion / hints:
Copying my comment from the other thread:

> Ah, the newline thing might be related to how `git` checks out the files.
> 
> Specifically, I have the `git` `autocrlf` setting enabled, and AppVeyor might not use that (which would surprise me, though), leading to different encoding of line endings on checkout.

Fix patch:
diff --git a/src/parser/strings.rs b/src/parser/strings.rs
index 91aa90b7..13af0a3c 100644
--- a/src/parser/strings.rs
+++ b/src/parser/strings.rs
@@ -12,7 +12,7 @@ named!(pub string(Span) -> InternalString,
        alt_complete!(
            ml_basic_string
          | basic_string
-         | ml_literal_string => { |s: Span| InternalString::from(s.fragment) }
+         | ml_literal_string => { |s: Span| InternalString::from(s.fragment.replace("\r\n", "\n")) }
          | literal_string    => { |s: Span| InternalString::from(s.fragment) }
        )
 );


Test patch: