mirror of
https://github.com/go-sylixos/elvish.git
synced 2024-12-05 03:17:50 +08:00
71cd3835bc
Qualified imports of pkg/tt outnumber unqualified (27 to 24). Improve consistency, and clarity, by changing the dot (unqualified) imports of that package symbols to qualified.
29 lines
479 B
Go
29 lines
479 B
Go
package vars
|
|
|
|
import (
|
|
"testing"
|
|
|
|
"src.elv.sh/pkg/tt"
|
|
)
|
|
|
|
var Args = tt.Args
|
|
|
|
func TestBlackhole(t *testing.T) {
|
|
v := NewBlackhole()
|
|
err := v.Set("foo")
|
|
if err != nil {
|
|
t.Errorf("v.Set(%q) -> %v, want nil", "foo", err)
|
|
}
|
|
val := v.Get()
|
|
if val != nil {
|
|
t.Errorf("v.Get() -> %v, want nil", val)
|
|
}
|
|
}
|
|
|
|
func TestIsBlackhole(t *testing.T) {
|
|
tt.Test(t, tt.Fn("IsBlackhole", IsBlackhole), tt.Table{
|
|
Args(NewBlackhole()).Rets(true),
|
|
Args(FromInit("")).Rets(false),
|
|
})
|
|
}
|