1#! /bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test msgcat: handling of 'range:' flags. 5 6cat <<\EOF > mcat-test18.in1 7msgid "one day" 8msgid_plural "%d days" 9msgstr[0] "" 10msgstr[1] "" 11 12#, c-format, range: 1..6 13msgid "one week and one day" 14msgid_plural "one week and %d days" 15msgstr[0] "" 16msgstr[1] "" 17 18#, c-format, range: 1..7 19msgid "two weeks and one day" 20msgid_plural "two weeks and %d days" 21msgstr[0] "" 22msgstr[1] "" 23 24#, c-format, range: 0..6 25msgid "three weeks and one day" 26msgid_plural "three weeks and %d days" 27msgstr[0] "" 28msgstr[1] "" 29EOF 30 31cat <<\EOF > mcat-test18.in2 32#, c-format, range: 1..6 33msgid "one day" 34msgid_plural "%d days" 35msgstr[0] "" 36msgstr[1] "" 37 38msgid "one week and one day" 39msgid_plural "one week and %d days" 40msgstr[0] "" 41msgstr[1] "" 42 43#, c-format, range: 0..6 44msgid "two weeks and one day" 45msgid_plural "two weeks and %d days" 46msgstr[0] "" 47msgstr[1] "" 48 49#, c-format, range: 1..7 50msgid "three weeks and one day" 51msgid_plural "three weeks and %d days" 52msgstr[0] "" 53msgstr[1] "" 54EOF 55 56rm -f mcat-test18.tmp 57: ${MSGCAT=msgcat} 58${MSGCAT} -o mcat-test18.tmp mcat-test18.in1 mcat-test18.in2 || Exit 1 59LC_ALL=C tr -d '\r' < mcat-test18.tmp > mcat-test18.out || Exit 1 60 61cat <<\EOF > mcat-test18.ok 62#, c-format 63msgid "one day" 64msgid_plural "%d days" 65msgstr[0] "" 66msgstr[1] "" 67 68#, c-format 69msgid "one week and one day" 70msgid_plural "one week and %d days" 71msgstr[0] "" 72msgstr[1] "" 73 74#, c-format, range: 0..7 75msgid "two weeks and one day" 76msgid_plural "two weeks and %d days" 77msgstr[0] "" 78msgstr[1] "" 79 80#, c-format, range: 0..7 81msgid "three weeks and one day" 82msgid_plural "three weeks and %d days" 83msgstr[0] "" 84msgstr[1] "" 85EOF 86 87: ${DIFF=diff} 88${DIFF} mcat-test18.ok mcat-test18.out 89result=$? 90 91exit $result 92