test(02-02): add failing tests for fuzzy match + switch workspace
- TestFuzzyMatchByLabel, TestFuzzyMatchByBranch, TestFuzzyMatchByCwd - TestFuzzyMatchPriority (label wins over branch) - TestFuzzyMatchNoResult, TestFuzzyMatchCaseInsensitive - TestSwitchToWorkspace, TestSwitchToWorkspaceError, TestSwitchToWorkspaceI3Error
This commit is contained in:
21
i3bridge.go
Normal file
21
i3bridge.go
Normal file
@@ -0,0 +1,21 @@
|
||||
package main
|
||||
|
||||
import (
|
||||
i3 "go.i3wm.org/i3/v4"
|
||||
)
|
||||
|
||||
// I3Commander abstrait i3.RunCommand pour testabilite.
|
||||
type I3Commander interface {
|
||||
RunCommand(command string) ([]i3.CommandResult, error)
|
||||
}
|
||||
|
||||
// FuzzyMatch trouve la premiere session matchant query dans : label > branche > cwd.
|
||||
// Case-insensitive. Retourne nil si aucun match.
|
||||
func FuzzyMatch(query string, sessions []SessionInfo) *SessionInfo {
|
||||
return nil
|
||||
}
|
||||
|
||||
// SwitchToWorkspace bascule vers le workspace indique via i3 IPC.
|
||||
func SwitchToWorkspace(commander I3Commander, wsName string) error {
|
||||
return nil
|
||||
}
|
||||
Reference in New Issue
Block a user