~rogpeppe/juju-core/themue-058-debug-log-api

« back to all changes in this revision

Viewing changes to juju/osenv/vars_test.go

  • Committer: Frank Mueller
  • Date: 2014-01-23 14:14:49 UTC
  • mfrom: (2152.1.95 juju-core)
  • Revision ID: frank.mueller@canonical.com-20140123141449-b30l57y7gs3wjkpw
debugger: merged trunk and fixed permission and interface problems

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
import (
7
7
        "path/filepath"
8
8
        "runtime"
9
 
        "testing"
10
9
 
11
10
        gc "launchpad.net/gocheck"
12
11
 
13
12
        "launchpad.net/juju-core/testing/testbase"
14
13
)
15
14
 
16
 
func Test(t *testing.T) {
17
 
        gc.TestingT(t)
18
 
}
19
 
 
20
15
type importSuite struct {
21
16
        testbase.LoggingSuite
22
17
}
37
32
 
38
33
func (s *importSuite) TestJujuHomeEnvVar(c *gc.C) {
39
34
        path := "/foo/bar/baz"
40
 
        s.PatchEnvironment(JujuHome, path)
 
35
        s.PatchEnvironment(JujuHomeEnvKey, path)
41
36
        c.Assert(JujuHomeDir(), gc.Equals, path)
42
37
}
43
38
 
44
39
func (s *importSuite) TestBlankJujuHomeEnvVar(c *gc.C) {
45
 
        s.PatchEnvironment(JujuHome, "")
 
40
        s.PatchEnvironment(JujuHomeEnvKey, "")
46
41
 
47
42
        if runtime.GOOS == "windows" {
48
43
                s.PatchEnvironment("APPDATA", `P:\foobar`)