diff options
Diffstat (limited to 'tests/integration.sh')
-rwxr-xr-x | tests/integration.sh | 65 |
1 files changed, 65 insertions, 0 deletions
diff --git a/tests/integration.sh b/tests/integration.sh index e69de29..fb22072 100755 --- a/tests/integration.sh +++ b/tests/integration.sh @@ -0,0 +1,65 @@ +#!/bin/sh +set -euo pipefail + +exit + +// FIXME +// func (s *xgettextTestSuite) TestIntegration(c *C) { +// fname := makeGoSourceFile(c, []byte(`package main +// +// func main() { +// // TRANSLATORS: foo comment +// // with multiple lines +// i18n.G("foo") +// +// // this comment has no translators tag +// i18n.G("abc") +// +// // TRANSLATORS: plural +// i18n.NG("singular", "plural", 99) +// +// i18n.G("zz %s") +// } +// `)) +// +// // a real integration test :) +// outName := filepath.Join(c.MkDir(), "snappy.pot") +// os.Args = []string{"test-binary", +// "--output", outName, +// "--keyword", "i18n.G", +// "--keyword-plural", "i18n.NG", +// "--msgid-bugs-address", "snappy-devel@lists.ubuntu.com", +// "--package-name", "snappy", +// fname, +// } +// main() +// +// // verify its what we expect +// got, err := ioutil.ReadFile(outName) +// c.Assert(err, IsNil) +// expected := fmt.Sprintf(`%s +// #: %[2]s:9 +// msgid "abc" +// msgstr "" +// +// #. TRANSLATORS: foo comment +// #. with multiple lines +// #: %[2]s:6 +// msgid "foo" +// msgstr "" +// +// #. TRANSLATORS: plural +// #: %[2]s:12 +// msgid "singular" +// msgid_plural "plural" +// msgstr[0] "" +// msgstr[1] "" +// +// #: %[2]s:14 +// #, c-format +// msgid "zz %%s" +// msgstr "" +// +// `, header, fname) +// c.Assert(string(got), Equals, expected) +// } |