aboutsummaryrefslogtreecommitdiff
path: root/protocol/sideband64k/append_preserves_dst_on_error_test.go
diff options
context:
space:
mode:
authorGravatar Runxi Yu2026-03-25 16:22:03 +0000
committerGravatar Runxi Yu2026-03-25 16:22:03 +0000
commit311edcd50f3a84f4b860bde3cb887451d74eaa11 (patch)
treebe7aa5e9a51e636358f33b1c90637b5024b70dc3 /protocol/sideband64k/append_preserves_dst_on_error_test.go
parentREADME: Split off contrib, benchmarks, remove history for now I guess, etc. (diff)
signatureNo signature
network/protocol: Rename from protocol v0.1.110
Diffstat (limited to 'protocol/sideband64k/append_preserves_dst_on_error_test.go')
-rw-r--r--protocol/sideband64k/append_preserves_dst_on_error_test.go34
1 files changed, 0 insertions, 34 deletions
diff --git a/protocol/sideband64k/append_preserves_dst_on_error_test.go b/protocol/sideband64k/append_preserves_dst_on_error_test.go
deleted file mode 100644
index 7c86a8b7..00000000
--- a/protocol/sideband64k/append_preserves_dst_on_error_test.go
+++ /dev/null
@@ -1,34 +0,0 @@
-package sideband64k_test
-
-import (
- "bytes"
- "errors"
- "testing"
-
- "codeberg.org/lindenii/furgit/protocol/sideband64k"
-)
-
-func TestAppendBandPreservesDstOnError(t *testing.T) {
- t.Parallel()
-
- orig := []byte("seed")
- dst := append([]byte(nil), orig...)
-
- out, err := sideband64k.AppendBand(dst, 4, []byte("x"))
- if !errors.Is(err, sideband64k.ErrInvalidBand) {
- t.Fatalf("got err %v, want ErrInvalidBand", err)
- }
-
- if !bytes.Equal(out, orig) {
- t.Fatalf("got %q, want %q", string(out), string(orig))
- }
-
- out, err = sideband64k.AppendData(dst, bytes.Repeat([]byte{'x'}, sideband64k.DataMax+1))
- if !errors.Is(err, sideband64k.ErrTooLarge) {
- t.Fatalf("got err %v, want ErrTooLarge", err)
- }
-
- if !bytes.Equal(out, orig) {
- t.Fatalf("got %q, want %q", string(out), string(orig))
- }
-}