| 1 | package fixture |
| 2 | |
| 3 | // Not compiled: testdata is ignored by the go tool. |
| 4 | |
| 5 | import ( |
| 6 | "fmt" |
| 7 | "strings" |
| 8 | ) |
| 9 | |
| 10 | // MV-N1: the head, with the joined list as its last fill-in. The element is |
| 11 | // one placeholder, built here. |
| 12 | func differs(names, kinds []string) string { |
| 13 | var out []string |
| 14 | for i := range names { |
| 15 | out = append(out, names[i]+" ("+kinds[i]+")") |
| 16 | } |
| 17 | return "the environment differs from the source's: " + strings.Join(out, ", ") |
| 18 | } |
| 19 | |
| 20 | // MV-N2: %q prints the quotes the row shows. The element is built in |
| 21 | // elem.go, where the record's element file map points. |
| 22 | func ambiguous(seg, alts string) string { |
| 23 | return fmt.Sprintf("account %q is ambiguous. pick one of: %s", seg, alts) |
| 24 | } |
| 25 | |
| 26 | // MV-N3: the head is spoken, but elem.go builds "<id> (<zone>)", not the |
| 27 | // row's "<id> [<zone>]". |
| 28 | func several(region, alts string) string { |
| 29 | return fmt.Sprintf("the region %q has several boxes: %s", region, alts) |
| 30 | } |
| 31 | |
| 32 | // MV-N4: the list is a fixed word, not the code's fill-in. |
| 33 | const noBox = "no box answered the probe: none" |
| 34 | |
| 35 | // MV-N5: the row has no colon before its list, so the gate cannot tell |
| 36 | // where the element starts. The code says it anyway. |
| 37 | func boxes(list string) string { return "the boxes " + list } |
| 38 | |
| 39 | // MV-N6's head is not spoken: the code says "configuration", the row "store". |
| 40 | func storeDiffers(list string) string { |
| 41 | return "the configuration differs from the source's: " + list |
| 42 | } |
| 43 | |