Esempio n. 1
0
func TestOverallXMLFileGeneration(t *testing.T) {
	{
		lang := "en"
		ts := makeTranslationSet("Sektion", "Foo", lang, "Some text")
		x := java.GetPropertiesFileContents(ts, lang)
		assert.True(t, util.XMLIsValid(x), "")
	}
	{
		lang := "en"
		ts := makeTranslationSet("Sektion -- two dashes", "Foo", lang, "Some text")
		x := java.GetPropertiesFileContents(ts, lang)
		assert.True(t, util.XMLIsValid(x), "-- in XML comment (section name)")
	}
}
Esempio n. 2
0
func TestComprehensiveInput(t *testing.T) {
	set := test.GetComprehensiveTestInputTranslationSet()
	for language, _ := range set.Languages {
		output := java.GetPropertiesFileContents(set, language)
		assert.True(t, util.XMLIsValid(output), language)
	}
}