cat / 012
clone

a spreadsheet for the terminal: lotus 1-2-3 looks, google sheets keys and formulas, one go binary

Random edits: cellValue, clear of the steps test's shown

Dami committed fd7abaa
commit
fd7abaa18a86132118ab63b9acc1bb5d158ea94d
parent
d0edca31e5c703de87f077d2ba7b7b217d2a36b3
author
Dami <dami.etoile@gmail.com>
kind
test risk score 0.2 of 3, Jev's estimate
1 file changed, +7 -7
Minternal/sheet/randedit_test.go14+++++++-------
M internal/sheet/randedit_test.go +7 -7
@@ -273,7 +273,7 @@ func saveBook(wb *Workbook) []byte {
273273 274274 // reopenDiff reads the saved file, sends its regions their rows again,275275 // and says how it differs from the workbook saved.276-func (r *randBook) reopenDiff(file []byte, vals map[string]shown) string {276+func (r *randBook) reopenDiff(file []byte, vals map[string]cellValue) string {277277 wb, err := ReadBook(bytes.NewReader(file))278278 if err != nil {279279 return "reopening: " + err.Error()
@@ -285,24 +285,24 @@ func (r *randBook) reopenDiff(file []byte, vals map[string]shown) string {
285285 return diffValues(vals, bookValues(wb))286286 }287287 288-// shown is a cell's value, and what was typed in it to say which.289-type shown struct {288+// cellValue is a cell's value, and what was typed in it to say which.289+type cellValue struct {290290 v Value291291 input string292292 }293293 294294 // bookValues are every filled cell's value, by sheet and address.295-func bookValues(wb *Workbook) map[string]shown {296- out := map[string]shown{}295+func bookValues(wb *Workbook) map[string]cellValue {296+ out := map[string]cellValue{}297297 for _, s := range wb.sheets {298298 for _, a := range s.Addrs() {299- out[s.name+"!"+a.String()] = shown{s.Value(a), s.Cell(a).Input}299+ out[s.name+"!"+a.String()] = cellValue{s.Value(a), s.Cell(a).Input}300300 }301301 }302302 return out303303 }304304 305-func diffValues(want, got map[string]shown) string {305+func diffValues(want, got map[string]cellValue) string {306306 var b strings.Builder307307 for k, w := range want {308308 if g, ok := got[k]; !ok || !sameValue(w.v, g.v) {