- 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:
@@ -22,7 +22,7 @@ func TestFileGenerator(t *testing.T) {
|
||||
_ = os.Chdir(tmp)
|
||||
defer func() { _ = os.Chdir(oldWd) }()
|
||||
|
||||
// REQUIREMENT: dirOnly shows only dirs
|
||||
|
||||
t.Run("dirOnly shows only dirs", func(t *testing.T) {
|
||||
gen := core.FileGenerator("/")
|
||||
results := gen([]string{"cd", ""}, "cd ", "")
|
||||
@@ -33,7 +33,7 @@ func TestFileGenerator(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
// REQUIREMENT: Filter extension shows only matching files
|
||||
|
||||
t.Run("Filter extension", func(t *testing.T) {
|
||||
gen := core.FileGenerator(".go")
|
||||
results := gen([]string{"ls", ""}, "ls ", "")
|
||||
@@ -51,7 +51,7 @@ func TestFileGenerator(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
// REQUIREMENT: Nested path (src/mai -> correct dir + prefix)
|
||||
|
||||
t.Run("Nested path", func(t *testing.T) {
|
||||
gen := core.FileGenerator()
|
||||
results := gen([]string{"ls", "src/u"}, "ls src/u", "src/u")
|
||||
@@ -66,7 +66,7 @@ func TestFileGenerator(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
// REQUIREMENT: Deep scan 1 level finds files in subdir
|
||||
|
||||
t.Run("Deep scan 1 level", func(t *testing.T) {
|
||||
gen := core.FileGenerator()
|
||||
results := gen([]string{"ls", "src/"}, "ls src/", "src/")
|
||||
@@ -81,10 +81,9 @@ func TestFileGenerator(t *testing.T) {
|
||||
}
|
||||
})
|
||||
|
||||
// REQUIREMENT: Deep scan does not go deeper than 1 level
|
||||
// (This is implicitly tested by the logic in FileGenerator)
|
||||
|
||||
// REQUIREMENT: Hidden files are skipped
|
||||
|
||||
|
||||
t.Run("Hidden files are skipped", func(t *testing.T) {
|
||||
gen := core.FileGenerator()
|
||||
results := gen([]string{"ls", ""}, "ls ", "")
|
||||
|
||||
Reference in New Issue
Block a user