Exemple #1
0
func TestQuotedSimple(t *testing.T) {
	Install()
	format, err := fmt.Compile("{0,quoted}")

	if err != nil {
		t.Error(format, err)
	}

	if str := format.Format(ginta.DefaultLocale, simpleArg); err != nil || str != expectSimple {
		t.Errorf("Got:\n%s\nExp:\n%s\nErr:%v\n", str, expectSimple, err)
	}
}
Exemple #2
0
func InstalledDefaultFormats(t *testing.T) {
	if _, err := fmt.Compile("{0,nr} {1,quoted} {2,plural,stem}"); err != nil {
		t.Error(err)
	}
}