Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
chifflier committed Nov 30, 2020
1 parent b975f25 commit 912904b
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// Public API tests
use nom::error::ErrorKind;
use nom::error::{make_error, ErrorKind};
use nom::Err;

use super::ssh::*;
Expand Down Expand Up @@ -144,10 +144,7 @@ fn test_new_keys() {
#[test]
fn test_invalid_packet0() {
let data = b"\x00\x00\x00\x00\x00\x00\x00\x00";
let expected = Err(Err::Error(error_position!(
&data[5..],
ErrorKind::LengthValue
)));
let expected = Err(Err::Error(make_error(&data[5..], ErrorKind::LengthValue)));
let res = parse_ssh_packet(data);
assert_eq!(res, expected);
}

0 comments on commit 912904b

Please sign in to comment.