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