d41761d6e9
Rewrites oxker from Rust/ratatui to Go/Bubbletea, migrated to the Bubbletea v2 API (charm.land/bubbletea/v2). Removes all original Rust source files and legacy Go modules (internal/ui, internal/input, bubbles). Key changes: - View() returns tea.View with declarative AltScreen and MouseMode - KeyMsg → KeyPressMsg, MouseMsg → MouseClickMsg/WheelMsg/MotionMsg/ReleaseMsg - execWriteKey rewritten for v2 key fields (Code/Mod/Text) - Mouse toggle via View field instead of imperative commands - Filter/search text input uses msg.Text for v2 space key compat Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
42 lines
795 B
Go
42 lines
795 B
Go
package main
|
|
|
|
import (
|
|
"testing"
|
|
)
|
|
|
|
func TestAppStart(t *testing.T) {
|
|
// Test that the application can be instantiated
|
|
// This is a simple smoke test to verify the app compiles and starts
|
|
|
|
// Parse default CLI args
|
|
cliArgs, err := ParseCLIArgs()
|
|
if err != nil {
|
|
t.Fatalf("Failed to parse CLI args: %v", err)
|
|
}
|
|
|
|
if cliArgs == nil {
|
|
t.Fatal("CLI args should not be nil")
|
|
}
|
|
|
|
// Test config loading
|
|
cfg, err := LoadConfig(cliArgs)
|
|
if err != nil {
|
|
t.Fatalf("Failed to load config: %v", err)
|
|
}
|
|
|
|
if cfg == nil {
|
|
t.Fatal("Config should not be nil")
|
|
}
|
|
|
|
// Test that debug mode works
|
|
cfg.GUI = false
|
|
if !cfg.GUI {
|
|
// Debug mode - should not error
|
|
}
|
|
|
|
// Test that GUI mode is enabled by default
|
|
cfg.GUI = true
|
|
if !cfg.GUI {
|
|
t.Fatal("GUI mode should be enabled")
|
|
}
|
|
} |