elvish/pkg/parse/source_test.go
Kurtis Rader ee309bf1c6 Don't dot import pkg/parse
Qualified imports of pkg/parse outnumber unqualified (66 to 1). Improve
consistency, and clarity, by changing the dot (unqualified) imports of
that package symbols to qualified.
2022-06-04 23:39:19 +01:00

19 lines
426 B
Go

package parse_test
import (
"testing"
"src.elv.sh/pkg/eval/vals"
"src.elv.sh/pkg/parse"
)
func TestSourceAsStructMap(t *testing.T) {
vals.TestValue(t, parse.Source{Name: "[tty]", Code: "echo"}).
Kind("structmap").
Repr("[&name='[tty]' &code=<...> &is-file=$false]").
AllKeys("name", "code", "is-file")
vals.TestValue(t, parse.Source{Name: "/etc/rc.elv", Code: "echo", IsFile: true}).
Index("is-file", true)
}