aboutsummaryrefslogtreecommitdiff
path: root/librsync/librsync_test.go
diff options
context:
space:
mode:
Diffstat (limited to 'librsync/librsync_test.go')
-rw-r--r--librsync/librsync_test.go9
1 files changed, 8 insertions, 1 deletions
diff --git a/librsync/librsync_test.go b/librsync/librsync_test.go
index 7c6a278..c291fac 100644
--- a/librsync/librsync_test.go
+++ b/librsync/librsync_test.go
@@ -22,7 +22,14 @@ func TestSignatureDeltaPatch(t *testing.T) {
t.Fatalf("Creating the signature failed: %s", err)
}
- if !bytes.Equal(sigbuf.Bytes(), testdata.RandomDataSig()) {
+ matches := false
+ // Check both possible signatures.
+ for _, sigcheck := range testdata.RandomDataSig() {
+ if bytes.Equal(sigbuf.Bytes(), sigcheck) {
+ matches = true
+ }
+ }
+ if !matches {
if path, err := dump(sigbuf); err == nil {
t.Fatalf("Signatures do not match. Generated signature dumped to %s", path)
} else {