elvish/newedit/listing_api_test.go
2019-03-12 22:01:08 +00:00

19 lines
536 B
Go

package newedit
import (
"testing"
)
func TestInitListing_Binding(t *testing.T) {
// Test that the binding variable in the returned namespace indeed refers to
// the BindingMap returned.
_, binding, ns := initListing(&fakeEditor{})
if ns["binding"].Get() != *binding {
t.Errorf("The binding var in the ns is not the same as the BindingMap")
}
}
// TODO: Test the builtin functions. As a prerequisite, we need to make listing
// mode's state observable, and expose fakeItems and fakeAcceptableItems of the
// listing package.