~ubuntu-branches/ubuntu/vivid/golang/vivid

« back to all changes in this revision

Viewing changes to src/cmd/fix/go1pkgrename_test.go

  • Committer: Package Import Robot
  • Author(s): James Page
  • Date: 2013-08-20 14:06:23 UTC
  • mfrom: (14.1.23 saucy-proposed)
  • Revision ID: package-import@ubuntu.com-20130820140623-b414jfxi3m0qkmrq
Tags: 2:1.1.2-2ubuntu1
* Merge from Debian unstable (LP: #1211749, #1202027). Remaining changes:
  - 016-armhf-elf-header.patch: Use correct ELF header for armhf binaries.
  - d/control,control.cross: Update Breaks/Replaces for Ubuntu
    versions to ensure smooth upgrades, regenerate control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
// Copyright 2011 The Go Authors.  All rights reserved.
2
 
// Use of this source code is governed by a BSD-style
3
 
// license that can be found in the LICENSE file.
4
 
 
5
 
package main
6
 
 
7
 
func init() {
8
 
        addTestCases(go1pkgrenameTests, go1pkgrename)
9
 
}
10
 
 
11
 
var go1pkgrenameTests = []testCase{
12
 
        {
13
 
                Name: "go1rename.0",
14
 
                In: `package main
15
 
 
16
 
import (
17
 
        "asn1"
18
 
        "big"
19
 
        "cmath"
20
 
        "csv"
21
 
        "exec"
22
 
        "exp/template/html"
23
 
        "gob"
24
 
        "http"
25
 
        "http/cgi"
26
 
        "http/fcgi"
27
 
        "http/httptest"
28
 
        "http/pprof"
29
 
        "json"
30
 
        "mail"
31
 
        "rand"
32
 
        "rpc"
33
 
        "rpc/jsonrpc"
34
 
        "scanner"
35
 
        "smtp"
36
 
        "syslog"
37
 
        "tabwriter"
38
 
        "template"
39
 
        "template/parse"
40
 
        "url"
41
 
        "utf16"
42
 
        "utf8"
43
 
        "xml"
44
 
 
45
 
        "crypto/bcrypt"
46
 
)
47
 
`,
48
 
                Out: `package main
49
 
 
50
 
import (
51
 
        "encoding/asn1"
52
 
        "encoding/csv"
53
 
        "encoding/gob"
54
 
        "encoding/json"
55
 
        "encoding/xml"
56
 
        "html/template"
57
 
        "log/syslog"
58
 
        "math/big"
59
 
        "math/cmplx"
60
 
        "math/rand"
61
 
        "net/http"
62
 
        "net/http/cgi"
63
 
        "net/http/fcgi"
64
 
        "net/http/httptest"
65
 
        "net/http/pprof"
66
 
        "net/mail"
67
 
        "net/rpc"
68
 
        "net/rpc/jsonrpc"
69
 
        "net/smtp"
70
 
        "net/url"
71
 
        "os/exec"
72
 
        "text/scanner"
73
 
        "text/tabwriter"
74
 
        "text/template"
75
 
        "text/template/parse"
76
 
        "unicode/utf16"
77
 
        "unicode/utf8"
78
 
 
79
 
        "code.google.com/p/go.crypto/bcrypt"
80
 
)
81
 
`,
82
 
        },
83
 
        {
84
 
                Name: "go1rename.1",
85
 
                In: `package main
86
 
 
87
 
import "cmath"
88
 
import poot "exp/template/html"
89
 
 
90
 
import (
91
 
        "ebnf"
92
 
        "old/regexp"
93
 
)
94
 
 
95
 
var _ = cmath.Sin
96
 
var _ = poot.Poot
97
 
`,
98
 
                Out: `package main
99
 
 
100
 
import "math/cmplx"
101
 
import poot "html/template"
102
 
 
103
 
import (
104
 
        "exp/ebnf"
105
 
        "old/regexp"
106
 
)
107
 
 
108
 
var _ = cmplx.Sin
109
 
var _ = poot.Poot
110
 
`,
111
 
        },
112
 
        {
113
 
                Name: "go1rename.2",
114
 
                In: `package foo
115
 
 
116
 
import (
117
 
        "fmt"
118
 
        "http"
119
 
        "url"
120
 
 
121
 
        "google/secret/project/go"
122
 
)
123
 
 
124
 
func main() {}
125
 
`,
126
 
                Out: `package foo
127
 
 
128
 
import (
129
 
        "fmt"
130
 
        "net/http"
131
 
        "net/url"
132
 
 
133
 
        "google/secret/project/go"
134
 
)
135
 
 
136
 
func main() {}
137
 
`,
138
 
        },
139
 
}