(t *testing.T, path, content string)
| 246 | |
| 247 | got := parseCargoTOML(filepath.Join(tmp, "crates", "app", "Cargo.toml")) |
| 248 | for _, want := range []string{"anyhow =1.0.102", "serde 1.0", "internal", "local-only"} { |
| 249 | if _, ok := got[want]; !ok { |
| 250 | t.Fatalf("parseCargoTOML missing %q from %#v", want, got) |
| 251 | } |
| 252 | } |
| 253 | } |
| 254 | |
| 255 | func TestParseCargoTOMLStopsAtPathOnlyWorkspaceRoot(t *testing.T) { |
| 256 | tmp := t.TempDir() |
| 257 | writeTestFile(t, filepath.Join(tmp, "Cargo.toml"), `[workspace] |
| 258 | members = ["repo"] |
| 259 |
no test coverage detected