#!/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) // }