Skip to content

Commit

Permalink
Add a test that the last op is hash
Browse files Browse the repository at this point in the history
  • Loading branch information
kovidgoyal committed Jul 14, 2023
1 parent ba9792b commit ed6c22c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tools/rsync/api_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ func run_roundtrip_test(t *testing.T, src_data, changed []byte, num_of_patches,
if err != nil {
t.Fatal(err)
}
if delta_ops[len(delta_ops)-1].Type != OpHash {
t.Fatalf("Last operation was not OpHash")
}
total_data_in_delta = 0
outputbuf := bytes.Buffer{}
for _, op := range delta_ops {
Expand Down

0 comments on commit ed6c22c

Please sign in to comment.