Windows Path `\` gets lost after parsing
I have written the following test, that reproduces the issue:
```rust
#[test]
fn reproduce_backslash_error_from_string() {
// GIVEN
let expected_value = r#"C:\Users"#;
let ini_string = format!("path={}", expected_value);
// WHEN
let ini = Ini::load_from_str(&ini_string).unwrap();
// THEN
assert_eq!(ini.general_section().get("path").unwrap(), expected_value);
}
```
This fails with:
```text
assertion `left == right` failed
left: "C:Users"
right: "C:\\Users"
```
So I have this ini:
```ini
path=C:\Users
```
And after parsing it becomes:
```ini
path=C:Users
```
关闭于 2024-04-12 2 条评论