23 lines
442 B
Go
23 lines
442 B
Go
package tui
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"b612.me/apps/b612/gdu/internal/testdir"
|
|
"github.com/stretchr/testify/assert"
|
|
)
|
|
|
|
func TestItemMarked(t *testing.T) {
|
|
fin := testdir.CreateTestDir()
|
|
defer fin()
|
|
|
|
ui := getAnalyzedPathMockedApp(t, false, true, false)
|
|
ui.done = make(chan struct{})
|
|
|
|
ui.fileItemMarked(1)
|
|
assert.Equal(t, ui.markedRows, map[int]struct{}{1: {}})
|
|
|
|
ui.fileItemMarked(1)
|
|
assert.Equal(t, ui.markedRows, map[int]struct{}{})
|
|
}
|