Francisco J Ballesteroszxfs put fix1449f3310 years agoHistory
36 lines · 568 B · Go
RawDownload
package cmd import (	"clive/u"	"os"	"testing") func TestCmd(t *testing.T) {	UnixIO()	h := GetEnv("HOME")	if h != u.Home {		t.Fatalf("didn't get home")	}	c := AppCtx()	if c.GetEnv("HOME") != u.Home {		t.Fatalf("didn't get home")	}	t.Logf("ns is %s", NS())	t.Logf("dot is %s", Dot())	pwd, _ := os.Getwd()	if Dot() != pwd {		t.Fatalf("bad dot")	}	c.SetEnv("foo", "bar")	if GetEnv("foo") != "bar" {		t.Fatalf("didn't setenv")	}	out := Out("out")	Eprintf("hi!\n")	Eprintf("There!\n")	Eprintf("There!\n")	Warn("ho\n")	Warn("ho")	close(out)}