github.com/xyproto/u-root@v6.0.1-0.20200302025726-5528e0c77a3c+incompatible/cmds/core/elvish/eval/resolve_test.go (about)

     1  package eval
     2  
     3  import (
     4  	"testing"
     5  
     6  	"github.com/u-root/u-root/cmds/core/elvish/tt"
     7  )
     8  
     9  var splitQNameTests = tt.Table{
    10  	tt.Args("a").Rets([]string{"a"}),
    11  	tt.Args("a:b").Rets([]string{"a:", "b"}),
    12  	tt.Args("a:b:").Rets([]string{"a:", "b:"}),
    13  	tt.Args("a:b:c:d").Rets([]string{"a:", "b:", "c:", "d"}),
    14  }
    15  
    16  func TestSplitQName(t *testing.T) {
    17  	tt.Test(t, tt.Fn("splitQName", splitQName), splitQNameTests)
    18  }