~ubuntu-branches/debian/sid/calligraplan/sid

« back to all changes in this revision

Viewing changes to tests/test_i18nc.sh

  • Committer: Package Import Robot
  • Author(s): Pino Toscano
  • Date: 2018-02-01 18:20:19 UTC
  • Revision ID: package-import@ubuntu.com-20180201182019-1qo7qaim5wejm5k9
Tags: upstream-3.1.0
ImportĀ upstreamĀ versionĀ 3.1.0

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh
 
2
# test_i18nc:
 
3
# $1: kundo2_aware_xgettext.sh 
 
4
# $2: xgettext
 
5
# $3: msgcat
 
6
# $4: podir
 
7
 
 
8
# source the kundo2_aware_xgettext.sh script
 
9
. "$1"
 
10
 
 
11
# setup environment variables for kundo2_aware_xgettext.sh
 
12
XGETTEXT_PROGRAM="$2"
 
13
MSGCAT="$3"
 
14
podir="$4"
 
15
 
 
16
# get common parameters
 
17
. parameters.sh
 
18
# kundo2_aware_xgettext.sh wants this in one variable
 
19
XGETTEXT="$XGETTEXT_PROGRAM $XGETTEXT_FLAGS"
 
20
 
 
21
potfile="test_i18nc.pot"
 
22
cppfile="test_i18nc.cpp"
 
23
 
 
24
kundo2_aware_xgettext "$potfile" "$cppfile"
 
25
 
 
26
# check result
 
27
if test ! -e "$podir/$potfile"; then
 
28
    echo "FAIL: pot file not created"
 
29
    exit 1
 
30
fi
 
31
if test 0 -ne `grep qtundo-format "$podir/$potfile"|wc -l`; then
 
32
    echo "FAIL: there should be 0 qtundo-format strings"
 
33
    exit 2
 
34
fi
 
35
if test 2 -ne `grep msgid "$podir/$potfile"|wc -l`; then
 
36
    echo "FAIL: there should be 2 message strings"
 
37
    exit 3
 
38
fi
 
39
 
 
40
exit 0