Debian Codegraph @

internal/sender/flist_test.go

raw symbols SCIP
1 package senderscip-go gomod github.com/gokrazy/rsync . `github.com/gokrazy/rsync/internal/sender`/
2
3 import "testingscip-go gomod github.com/golang/go/src go1.25.0 testing/"
4
5 func TestPathscip-go gomod github.com/gokrazy/rsync . `github.com/gokrazy/rsync/internal/sender`/TestPath().(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) {
6 for _, tt := range []struct {
7 requested string
8 wantRoot string
9 wantStrip string
10 }{
11 {
12 requested: "/", // sent by client
13 wantStrip: "",
14 },
15
16 {
17 requested: "tr/man5", // sent by client
18 wantStrip: "",
19 },
20
21 {
22 requested: "tr/", // sent by client
23 wantStrip: "tr/",
24 },
25
26 { // client started with src=/usr/share/man
27 requested: "", // sent by client
28 wantStrip: "",
29 },
30 } {
31 t.Runscip-go gomod github.com/golang/go/src go1.25.0 testing/T#Run().("requested="+tt.requested, func(t *testingscip-go gomod github.com/golang/go/src go1.25.0 testing/.Tscip-go gomod github.com/golang/go/src go1.25.0 testing/T#) {
32 gotStrip := getStripscip-go gomod github.com/gokrazy/rsync . `github.com/gokrazy/rsync/internal/sender`/getStrip().(tt.requested)
33 if gotStrip != tt.wantStrip {
34 t.Errorfscip-go gomod github.com/golang/go/src go1.25.0 testing/common#Errorf().("unexpected strip: got %q, want %q", gotStrip, tt.wantStrip)
35 }
36 })
37 }
38 }