src.elv.sh@v0.21.0-dev.0.20240515223629-06979efb9a2a/pkg/cli/histutil/mem_store_test.go (about)

     1  package histutil
     2  
     3  import (
     4  	"testing"
     5  
     6  	"src.elv.sh/pkg/store/storedefs"
     7  )
     8  
     9  func TestMemStore_Cursor(t *testing.T) {
    10  	s := NewMemStore("+ 0", "- 1", "+ 2")
    11  	testCursorIteration(t, s.Cursor("+"), []storedefs.Cmd{
    12  		{Text: "+ 0", Seq: 0},
    13  		{Text: "+ 2", Seq: 2},
    14  	})
    15  }
    16  
    17  // Remaining methods tested along with HybridStore