Skip to content

Commit

Permalink
move the test for issue 759 to the tests/issues.rs file
Browse files Browse the repository at this point in the history
  • Loading branch information
Geal committed May 19, 2018
1 parent f3e8c0f commit a7aa0c6
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 21 deletions.
3 changes: 0 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -81,9 +81,6 @@ required-features = ["alloc"]
name = "ini_str"
required-features = ["alloc"]

[[test]]
name = "issue_759"

[[test]]
name = "issues"
required-features = ["alloc", "regexp_macros"]
Expand Down
18 changes: 0 additions & 18 deletions tests/issue_759.rs

This file was deleted.

15 changes: 15 additions & 0 deletions tests/issues.rs
Original file line number Diff line number Diff line change
Expand Up @@ -253,3 +253,18 @@ named!(issue_724<&str, i32>,

named!(issue_741_str<CompleteStr, CompleteStr>, re_match!(r"^_?[A-Za-z][0-9A-Z_a-z-]*"));
named!(issue_741_bytes<CompleteByteSlice, CompleteByteSlice>, re_bytes_match!(r"^_?[A-Za-z][0-9A-Z_a-z-]*"));


fn atom_specials(c: u8) -> bool {
c == b'q'
}

named!(
capability<&str>,
do_parse!(tag_s!(" ") >> _atom: map_res!(take_till1!(atom_specials), std::str::from_utf8) >> ("a"))
);

#[test]
fn issue_759() {
assert_eq!(capability(b" abcqd"), Ok((&b"qd"[..], "a")));
}

0 comments on commit a7aa0c6

Please sign in to comment.