MCPcopy
hub / github.com/jetify-com/devbox / TestParseVersionInfoError

Function TestParseVersionInfoError

nix/nix_test.go:133–152  ·  view source on GitHub ↗
(t *testing.T)

Source from the content-addressed store, hash-verified

131}
132
133func TestParseVersionInfoError(t *testing.T) {
134 t.Run("NilOutput", func(t *testing.T) {
135 _, err := parseInfo(nil)
136 if err == nil {
137 t.Error("want non-nil error")
138 }
139 })
140 t.Run("EmptyOutput", func(t *testing.T) {
141 _, err := parseInfo([]byte{})
142 if err == nil {
143 t.Error("want non-nil error")
144 }
145 })
146 t.Run("MissingVersionOutput", func(t *testing.T) {
147 _, err := parseInfo([]byte("nix output without a version"))
148 if err == nil {
149 t.Error("want non-nil error")
150 }
151 })
152}
153
154func TestVersionInfoAtLeast(t *testing.T) {
155 info := Info{}

Callers

nothing calls this directly

Calls 3

parseInfoFunction · 0.85
RunMethod · 0.65
ErrorMethod · 0.45

Tested by

no test coverage detected