(t *testing.T)
| 563 | } |
| 564 | |
| 565 | func TestSplitKeys(t *testing.T) { |
| 566 | inps := []struct { |
| 567 | s string |
| 568 | keys []string |
| 569 | }{ |
| 570 | {"", nil}, |
| 571 | {"j", []string{"j"}}, |
| 572 | {"jk", []string{"j", "k"}}, |
| 573 | {"1j", []string{"1", "j"}}, |
| 574 | {"42j", []string{"4", "2", "j"}}, |
| 575 | {"<space>", []string{"<space>"}}, |
| 576 | {"j<space>", []string{"j", "<space>"}}, |
| 577 | {"j<space>k", []string{"j", "<space>", "k"}}, |
| 578 | {"1j<space>k", []string{"1", "j", "<space>", "k"}}, |
| 579 | {"1j<space>1k", []string{"1", "j", "<space>", "1", "k"}}, |
| 580 | {"<>", []string{"<>"}}, |
| 581 | {"<space", []string{"<space"}}, |
| 582 | {"<space<", []string{"<space<"}}, |
| 583 | {"<space<>", []string{"<space<>"}}, |
| 584 | {"><space>", []string{">", "<space>"}}, |
| 585 | {"><space>>", []string{">", "<space>", ">"}}, |
| 586 | } |
| 587 | |
| 588 | for _, inp := range inps { |
| 589 | if keys := splitKeys(inp.s); !reflect.DeepEqual(keys, inp.keys) { |
| 590 | t.Errorf("at input '%s' expected '%v' but got '%v'", inp.s, inp.keys, keys) |
| 591 | } |
| 592 | } |
| 593 | } |
| 594 | |
| 595 | func TestApplyBoolOpt(t *testing.T) { |
| 596 | tests := []struct { |
nothing calls this directly
no test coverage detected