github.com/ladydascalie/elvish@v0.0.0-20170703214355-2964dd3ece7f/edit/histlist_test.go (about)

     1  package edit
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/elves/elvish/edit/ui"
     7  )
     8  
     9  var (
    10  	theHistList = newHistlist([]string{"ls", "echo lalala", "ls"})
    11  
    12  	histlistFilterTests = []listingFilterTestCases{
    13  		{"", []shown{
    14  			{"0", ui.Unstyled("ls")},
    15  			{"1", ui.Unstyled("echo lalala")},
    16  			{"2", ui.Unstyled("ls")}}},
    17  		{"l", []shown{
    18  			{"0", ui.Unstyled("ls")},
    19  			{"1", ui.Unstyled("echo lalala")},
    20  			{"2", ui.Unstyled("ls")}}},
    21  		// {"ch", []styled{unstyled("1 echo lalala")}},
    22  	}
    23  )
    24  
    25  func TestHistlist(t *testing.T) {
    26  	testListingFilter(t, "theHistList", theHistList, histlistFilterTests)
    27  }