1 // Copyright 2013 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.
7 // This file contains test data.
14 type testLoader struct {
17 func (t testLoader) Len() int {
21 func (t testLoader) Path(i int) string {
25 func (t testLoader) Reader(i int) (io.ReadCloser, error) {
26 return &reader{*strings.NewReader(testFiles[i])}, nil
29 // reader adds a dummy Close method to strings.Reader so that it
30 // satisfies the io.ReadCloser interface.
35 func (r reader) Close() error {
40 testFiles = []string{de_xml, gsw_xml, root_xml}
43 "common/main/gsw.xml",
44 "common/main/root.xml",
48 var root_xml = `<?xml version="1.0" encoding="UTF-8" ?>
49 <!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd">
52 <language type="root"/>
53 <generation date="now"/>
56 <exemplarCharacters>[]</exemplarCharacters>
57 <exemplarCharacters type="auxiliary">[]</exemplarCharacters>
58 <exemplarCharacters type="punctuation">[\- ‐ – — … ' ‘ ‚ " “ „ \& #]</exemplarCharacters>
59 <ellipsis type="final">{0}…</ellipsis>
60 <ellipsis type="initial">…{0}</ellipsis>
61 <moreInformation>?</moreInformation>
65 <default choice="gregorian"/>
66 <calendar type="buddhist">
68 <alias source="locale" path="../../calendar[@type='gregorian']/months"/>
71 <calendar type="chinese">
73 <alias source="locale" path="../../calendar[@type='gregorian']/months"/>
76 <calendar type="gregorian">
78 <default choice="format"/>
79 <monthContext type="format">
80 <default choice="wide"/>
81 <monthWidth type="narrow">
82 <alias source="locale" path="../../monthContext[@type='stand-alone']/monthWidth[@type='narrow']"/>
84 <monthWidth type="wide">
85 <month type="1">11</month>
86 <month type="2">22</month>
87 <month type="3">33</month>
88 <month type="4">44</month>
91 <monthContext type="stand-alone">
92 <monthWidth type="narrow">
93 <month type="1">1</month>
94 <month type="2">2</month>
95 <month type="3">3</month>
96 <month type="4">4</month>
98 <monthWidth type="wide">
99 <alias source="locale" path="../../monthContext[@type='format']/monthWidth[@type='wide']"/>
109 var de_xml = `<?xml version="1.0" encoding="UTF-8" ?>
110 <!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd">
113 <language type="de"/>
116 <exemplarCharacters>[a ä b c d e ö p q r s ß t u ü v w x y z]</exemplarCharacters>
117 <exemplarCharacters type="auxiliary">[á à ă]</exemplarCharacters>
118 <exemplarCharacters type="index">[A B C D E F G H Z]</exemplarCharacters>
119 <ellipsis type="final">{0} …</ellipsis>
120 <ellipsis type="initial">… {0}</ellipsis>
121 <moreInformation>?</moreInformation>
123 <stopwordList type="collation" draft="provisional">der die das</stopwordList>
128 <calendar type="buddhist">
130 <monthContext type="format">
131 <monthWidth type="narrow">
132 <month type="3">BBB</month>
134 <monthWidth type="wide">
135 <month type="3">bbb</month>
140 <calendar type="gregorian">
142 <monthContext type="format">
143 <monthWidth type="narrow">
144 <month type="3">M</month>
145 <month type="4">A</month>
147 <monthWidth type="wide">
148 <month type="3">Maerz</month>
149 <month type="4">April</month>
150 <month type="5">Mai</month>
153 <monthContext type="stand-alone">
154 <monthWidth type="narrow">
155 <month type="3">m</month>
156 <month type="5">m</month>
158 <monthWidth type="wide">
159 <month type="4">april</month>
160 <month type="5">mai</month>
169 <yesstr>yes:y</yesstr>
176 var gsw_xml = `<?xml version="1.0" encoding="UTF-8" ?>
177 <!DOCTYPE ldml SYSTEM "../../common/dtd/ldml.dtd">
180 <language type="gsw"/>
183 <alias source="de" path="//ldml/posix"/>