MCPcopy Index your code
hub / github.com/google/git-appraise / TestSplitBatchCheckOutput

Function TestSplitBatchCheckOutput

repository/git_test.go:59–77  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

57)
58
59func TestSplitBatchCheckOutput(t *testing.T) {
60 buf := bytes.NewBuffer([]byte(simpleBatchCheckOutput))
61 commitsMap, err := splitBatchCheckOutput(buf)
62 if err != nil {
63 t.Fatal(err)
64 }
65 if !commitsMap["ddbdcb9d5aa71d35de481789bacece9a2f8138d0"] {
66 t.Fatal("Failed to recognize the first commit as valid")
67 }
68 if !commitsMap["de9ebcdf2a1e93365eefc2739f73f2c68a280c11"] {
69 t.Fatal("Failed to recognize the second commit as valid")
70 }
71 if !commitsMap["e90f75882526e9bc5a71af64d60ea50092ed0b1d"] {
72 t.Fatal("Failed to recognize the last commit as valid")
73 }
74 if commitsMap["df324616ea2bc9bf6fc7025fc80a373ecec687b6"] {
75 t.Fatal("Failed to filter out a missing object")
76 }
77}
78
79func TestSplitBatchCatFileOutput(t *testing.T) {
80 buf := bytes.NewBuffer([]byte(simpleBatchCatFileOutput))

Callers

nothing calls this directly

Calls 1

splitBatchCheckOutputFunction · 0.85

Tested by

no test coverage detected