From 85df15bfc3483716996a65ade28465a78d259946 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Fri, 14 Jul 2023 09:45:28 +0530 Subject: [PATCH] Add a test that the last op is hash --- tools/rsync/api_test.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tools/rsync/api_test.go b/tools/rsync/api_test.go index 4c2637bc2..51a46b9ab 100644 --- a/tools/rsync/api_test.go +++ b/tools/rsync/api_test.go @@ -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 {