Fix: issue #4 and #5 (#6)

- Issue #4: currently there is no official release yet so we cant
download from installer
- I added an installer debugger here to test
(f091dbf13bdf109b631951e2558651f560ca8b84)
- Issue #5: my another library
[fuzzy](https://github.com/versenilvis/fuzzy/) has a logic bug so it
causes crash, fix d479c6cb4d8453e50366c9839daaabb45a98a2df

- Other:
  -  remove unneeded comments (edd9d05fdd16e682b6b416913e2fa9c3f6599956)
  - Add some tests
  - Fix reload crash (3a76e78e655fd8daafb635ec0937667325f75ee4)
- New optimized build command (56a4a815f836271b861f32795d2df3b25a3dffc0)
This commit is contained in:
VERSE
2026-05-23 23:22:04 +07:00
committed by GitHub
parent aafd3cca93
commit d06526cf21
11 changed files with 267 additions and 61 deletions
-11
View File
@@ -13,19 +13,12 @@ func TestTokenize(t *testing.T) {
input string
expected []string
}{
// REQUIREMENT: Empty input
{"Empty input", "", []string{""}},
// REQUIREMENT: Trailing space("git " -> 2 tokens, the last token is "")
{"Trailing space", "git ", []string{"git", ""}},
// REQUIREMENT: Multi-space("git add")
{"Multi-space", "git add", []string{"git", "add"}},
// REQUIREMENT: Quoted string("git commit -m \"hello world\"")
{"Quoted string", "git commit -m \"hello world\"", []string{"git", "commit", "-m", "hello world"}},
// REQUIREMENT: Quote not closed
{"Quote not closed", "git commit -m \"hello", []string{"git", "commit", "-m", "hello"}},
// REQUIREMENT: Single quote vs double quote
{"Single quote", "git commit -m 'hello world'", []string{"git", "commit", "-m", "hello world"}},
// REQUIREMENT: Backslash escape
{"Backslash escape", "git commit -m \"hello\\ world\"", []string{"git", "commit", "-m", "hello world"}},
}
@@ -46,13 +39,9 @@ func TestHasPrefix(t *testing.T) {
prefix string
want bool
}{
// REQUIREMENT: Case insensitive match
{"Case insensitive", "Hello", "hel", true},
// REQUIREMENT: Unicode support (Vietnamese)
{"Unicode support", "Thử nghiệm", "thử", true},
// REQUIREMENT: Prefix longer than string -> false
{"Prefix longer", "Iris", "Iris-Longer", false},
// REQUIREMENT: Empty prefix -> true
{"Empty prefix", "Iris", "", true},
}