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

Fix our last test about LZO from MirageVPN #158

Merged
merged 1 commit into from
Sep 18, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/lzo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ let fiber : (unit, [> error ]) t =
read byte >>= fun h ->
let state = State.of_int (Char.code chr land 0b11) in
let off = (Char.code h lsl 2) + (Char.code chr lsr 2) + 2049 in
copy ~off ~len:1 state
copy ~off ~len:1 state >>= fun () -> m
| '\016' .. '\031', _ ->
let length = Char.code chr land 0b111 in
let with_length len =
Expand Down Expand Up @@ -390,7 +390,7 @@ let fiber : (unit, [> error ]) t =
transmit ~len:4 State._0 >>= fun () -> fiber
| '\022' .. '\255' as chr ->
let len = Char.code chr - 17 in
junk byte >>= fun () -> transmit ~len State._0
junk byte >>= fun () -> transmit ~len State._0 >>= fun () -> fiber

let uncompress input output : (bigstring, [> error ]) result =
let v = {i= input; i_pos= 0; o= output; o_pos= 0; state= State._0} in
Expand Down
2 changes: 1 addition & 1 deletion test/test_lzo.ml
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,7 @@ let () =
( "lzo"
, [
test_lzo_0 (); test_lzo_1 (); test_lzo_2 (); test_lzo_3 ()
; test_lzo_4 (); test_lzo_5 (); test_lzo_6 () (* ; test_lzo_7 () *)
; test_lzo_4 (); test_lzo_5 (); test_lzo_6 () ; test_lzo_7 ()
; test_lzo_8 (); test_lzo_9 (); test_lzo_10 (); test_lzo_11 ()
; test_lzo_12 (); test_lzo_13 (); test_lzo_14 (); test_lzo_15 ()
] )
Expand Down