File: test01.rs

package info (click to toggle)
rust-x509-parser 0.18.0-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 760 kB
  • sloc: python: 29; makefile: 2; sh: 1
file content (19 lines) | stat: -rw-r--r-- 585 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
use nom::bytes::complete::take;

#[test]
fn test01() {
    let data = b"0\x88\xff\xff\xff\xff\xff\xff\xff\xff00\x0f\x02\x000\x00\x00\x00\x00\x00\x0000\x0f\x00\xff\x0a\xbb\xff";
    let _ = x509_parser::parse_x509_certificate(data);
}

fn parser02(input: &[u8]) -> nom::IResult<&[u8], ()> {
    let (_hdr, input) = take(1_usize)(input)?;
    let (_data, input) = take(usize::MAX)(input)?;
    Ok((input, ()))
}

#[test]
fn test02() {
    let data = b"0\x88\xff\xff\xff\xff\xff\xff\xff\xff00\x0f\x02\x000\x00\x00\x00\x00\x00\x0000\x0f\x00\xff\x0a\xbb\xff";
    let _ = parser02(data);
}