Skip to content
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

"-(tab)string" is incorrectly parsed #149

Open
ExpHP opened this issue Jan 18, 2020 · 0 comments
Open

"-(tab)string" is incorrectly parsed #149

ExpHP opened this issue Jan 18, 2020 · 0 comments

Comments

@ExpHP
Copy link

ExpHP commented Jan 18, 2020

Found this while modifying the tests for #148. The current implementation incorrectly parses examples 6.2 and 6.3 in the spec.

#[test]
fn ex() {
    use yaml_rust::YamlLoader;

    let docs = YamlLoader::load_from_str("-\tb").unwrap();
    assert_eq!(docs[0].as_vec().unwrap()[0].as_str().unwrap(), "b");
}
thread 'ex' panicked at 'assertion failed: `(left == right)`
  left: `"\tb"`,
 right: `"b"`', src\main.rs:100:5
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant