3 # Some tests for java support
7 trap 'rm -fr $tmpfiles' 1 2 3 15
9 tmpfiles
="$tmpfiles xg-j-1.java"
10 cat <<EOF > xg-j-1.java
13 ResourceBundle b = ResourceBundle.getBundle("test");
14 GetTextBundle b2 = (GetTextBundle)b;
16 String test1 = b.getString("Test String 1");
18 String test2 = b2.gettext("Test String 2");
21 String test3 = b.getString("Test String 3");
23 // java "multiline" string
24 String test4 = b.getString("Test " +
29 String test5 = b.getString("");
34 tmpfiles
="$tmpfiles xg-j-1.po"
35 : ${XGETTEXT=xgettext}
36 ${XGETTEXT} --omit-header --no-location -c -d xg-j-1 xg-j-1.java
37 test $?
= 0 ||
{ rm -fr $tmpfiles; exit 1; }
39 tmpfiles
="$tmpfiles xg-j-1.ok"
53 #. java "multiline" string
63 ${DIFF} xg-j-1.ok xg-j-1.po