Fix test build after NewLogic signature change; add development plan draft
NewLogic now takes (FileSystem, path, openfunc); update the e2e harness and editor tests accordingly. The harness uses a no-op openfunc, matching impl_other.go (the real app's OpenFile is a platform bridge, no-op off Android). Also adds doc/development_plan.md (draft, with corrections note re: the live repo state).
This commit is contained in:
@@ -33,7 +33,7 @@ func TestWriteFailureTracking(t *testing.T) {
|
||||
// TestAutoSave_RetryFails verifies that failed writes trigger retry mechanism.
|
||||
func TestAutoSave_RetryFails(t *testing.T) {
|
||||
// Setup: New Logic, set mock FS to fail
|
||||
l := NewLogic(nil)
|
||||
l := NewLogic(nil, "/", func(string) {})
|
||||
|
||||
// Start a goroutine to drain frameChan to prevent deadlocks
|
||||
go func() {
|
||||
|
||||
@@ -16,7 +16,7 @@ func TestAutoSaveE2E(t *testing.T) {
|
||||
initialContent := "Hello"
|
||||
mockFS.AddFile(filename, []byte(initialContent), time.Now())
|
||||
|
||||
l := NewLogic(mockFS)
|
||||
l := NewLogic(mockFS, "/", func(string) {})
|
||||
go l.Run()
|
||||
defer l.Done()
|
||||
|
||||
@@ -93,7 +93,7 @@ func TestLargeFileChunkBoundary(t *testing.T) {
|
||||
}
|
||||
mockFS.AddFile(filename, initialContent, time.Now())
|
||||
|
||||
l := NewLogic(mockFS)
|
||||
l := NewLogic(mockFS, "/", func(string) {})
|
||||
go l.Run()
|
||||
defer l.Done()
|
||||
|
||||
@@ -232,7 +232,7 @@ func TestFlushOnExitE2E(t *testing.T) {
|
||||
initialContent := "Hello"
|
||||
mockFS.AddFile(filename, []byte(initialContent), time.Now())
|
||||
|
||||
l := NewLogic(mockFS)
|
||||
l := NewLogic(mockFS, "/", func(string) {})
|
||||
go l.Run()
|
||||
defer l.Done()
|
||||
|
||||
|
||||
@@ -14,7 +14,7 @@ func TestOpenFileIntegration(t *testing.T) {
|
||||
content := "Hello World"
|
||||
mockFS.AddFile(filename, []byte(content), time.Now())
|
||||
|
||||
l := NewLogic(mockFS)
|
||||
l := NewLogic(mockFS, "/", func(string) {})
|
||||
go l.Run()
|
||||
defer l.Done()
|
||||
|
||||
|
||||
@@ -23,7 +23,7 @@ type HarnessOption func(*Harness)
|
||||
// NewHarness creates a test harness with the given options.
|
||||
func NewHarness(opts ...HarnessOption) *Harness {
|
||||
h := &Harness{
|
||||
logic: editor.NewLogic(nil),
|
||||
logic: editor.NewLogic(nil, "/", func(string) {}), // no-op openfunc (matches impl_other.go)
|
||||
capture: NewFrameCapture(),
|
||||
frameReceiverDone: make(chan struct{}),
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user