// Copyright 2013 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package cldr
// This file contains test data.
import (
"io"
"strings"
)
type testLoader struct {
}
func (t testLoader) Len() int {
return len(testFiles)
}
func (t testLoader) Path(i int) string {
return testPaths[i]
}
func (t testLoader) Reader(i int) (io.ReadCloser, error) {
return &reader{*strings.NewReader(testFiles[i])}, nil
}
// reader adds a dummy Close method to strings.Reader so that it
// satisfies the io.ReadCloser interface.
type reader struct {
strings.Reader
}
func (r reader) Close() error {
return nil
}
var (
testFiles = []string{de_xml, gsw_xml, root_xml}
testPaths = []string{
"common/main/de.xml",
"common/main/gsw.xml",
"common/main/root.xml",
}
)
var root_xml = `
[]
[]
[\- ‐ – — … ' ‘ ‚ " “ „ \& #]
{0}…
…{0}
?
11
22
33
44
1
2
3
4
`
var de_xml = `
[a ä b c d e ö p q r s ß t u ü v w x y z]
[á à ă]
[A B C D E F G H Z]
{0} …
… {0}
?
der die das
BBB
bbb
M
A
Maerz
April
Mai
m
m
april
mai
yes:y
no:n
`
var gsw_xml = `
`