1*946379e7Schristos#! /bin/sh 2*946379e7Schristos 3*946379e7Schristos# Test compendium option. 4*946379e7Schristos 5*946379e7Schristos# Translation is available within the compendium (mm-c-3.com) 6*946379e7Schristos# the old translation file (mm-c-3.in1) contains the same msgid 7*946379e7Schristos# Why not make use of the translation from the compendium? 8*946379e7Schristos 9*946379e7Schristostmpfiles="" 10*946379e7Schristostrap 'rm -fr $tmpfiles' 1 2 3 15 11*946379e7Schristos 12*946379e7Schristostmpfiles="$tmpfiles mm-c-3.in1 mm-c-3.com mm-c-3.pot" 13*946379e7Schristoscat <<EOF > mm-c-3.in1 14*946379e7Schristos#: file.c:123 15*946379e7Schristosmsgid "1" 16*946379e7Schristosmsgstr "1x" 17*946379e7Schristos 18*946379e7Schristos#: file.c:345 19*946379e7Schristosmsgid "one, two, three" 20*946379e7Schristosmsgstr "" 21*946379e7SchristosEOF 22*946379e7Schristos 23*946379e7Schristoscat <<EOF > mm-c-3.com 24*946379e7Schristos#: file.c:345 25*946379e7Schristosmsgid "one, two, three" 26*946379e7Schristosmsgstr "1, 2, 3" 27*946379e7SchristosEOF 28*946379e7Schristos 29*946379e7Schristoscat <<EOF > mm-c-3.pot 30*946379e7Schristos#: file.c:123 31*946379e7Schristosmsgid "1" 32*946379e7Schristosmsgstr "" 33*946379e7Schristos 34*946379e7Schristos#: file.c:345 35*946379e7Schristosmsgid "one, two, three" 36*946379e7Schristosmsgstr "" 37*946379e7SchristosEOF 38*946379e7Schristos 39*946379e7Schristostmpfiles="$tmpfiles mm-c-3.out" 40*946379e7Schristos: ${MSGMERGE=msgmerge} 41*946379e7Schristos${MSGMERGE} -q -C mm-c-3.com -o mm-c-3.out mm-c-3.in1 mm-c-3.pot 42*946379e7Schristostest $? = 0 || { rm -fr $tmpfiles; exit 1; } 43*946379e7Schristos 44*946379e7Schristostmpfiles="$tmpfiles mm-c-3.ok" 45*946379e7Schristoscat << EOF > mm-c-3.ok 46*946379e7Schristos#: file.c:123 47*946379e7Schristosmsgid "1" 48*946379e7Schristosmsgstr "1x" 49*946379e7Schristos 50*946379e7Schristos#: file.c:345 51*946379e7Schristosmsgid "one, two, three" 52*946379e7Schristosmsgstr "1, 2, 3" 53*946379e7SchristosEOF 54*946379e7Schristos 55*946379e7Schristos: ${DIFF=diff} 56*946379e7Schristos${DIFF} mm-c-3.ok mm-c-3.out 57*946379e7Schristosresult=$? 58*946379e7Schristos 59*946379e7Schristosrm -fr $tmpfiles 60*946379e7Schristos 61*946379e7Schristosexit $result 62