MCPcopy Create free account
hub / github.com/chainreactors/EvilProxy / TestFileSizeProbeCommand

Function TestFileSizeProbeCommand

internal/sessions/transfer_test.go:1078–1086  ·  view source on GitHub ↗

=================================================================== I. File Size Probe Tests ===================================================================

(t *testing.T)

Source from the content-addressed store, hash-verified

1076// ===================================================================
1077
1078func TestFileSizeProbeCommand(t *testing.T) {
1079 cmd := FileSizeProbeCommand("/tmp/test.bin")
1080 if !strings.Contains(cmd, "stat") && !strings.Contains(cmd, "wc") {
1081 t.Errorf("probe command should use stat or wc: %s", cmd)
1082 }
1083 if !strings.Contains(cmd, "/tmp/test.bin") {
1084 t.Errorf("probe command should reference file path: %s", cmd)
1085 }
1086}
1087
1088func TestParseFileSizeOutput_Plain(t *testing.T) {
1089 size, err := ParseFileSizeOutput("12345\n")

Callers

nothing calls this directly

Calls 1

FileSizeProbeCommandFunction · 0.85

Tested by

no test coverage detected