Home | History | Annotate | Line # | Download | only in tests
      1 #! /bin/sh
      2 
      3 # Test C++ support: test --flag that introduces qt-format.
      4 
      5 tmpfiles=""
      6 trap 'rm -fr $tmpfiles' 1 2 3 15
      7 
      8 tmpfiles="$tmpfiles xg-c-13.cc"
      9 cat <<\EOF > xg-c-13.cc
     10 foo (gettext ("on"));
     11 EOF
     12 
     13 tmpfiles="$tmpfiles xg-c-13.po"
     14 : ${XGETTEXT=xgettext}
     15 ${XGETTEXT} --omit-header --no-location -d xg-c-13 \
     16   --flag=foo:1:qt-format --flag=gettext:1:pass-qt-format --qt \
     17   xg-c-13.cc
     18 test $? = 0 || { rm -fr $tmpfiles; exit 1; }
     19 
     20 tmpfiles="$tmpfiles xg-c-13.ok"
     21 cat <<EOF > xg-c-13.ok
     22 #, qt-format
     23 msgid "on"
     24 msgstr ""
     25 EOF
     26 
     27 : ${DIFF=diff}
     28 ${DIFF} xg-c-13.ok xg-c-13.po
     29 result=$?
     30 
     31 rm -fr $tmpfiles
     32 
     33 exit $result
     34