1#!/bin/sh 2. "${srcdir=.}/init.sh"; path_prepend_ . ../src 3 4# Test of JavaScript Unicode support. 5 6cat <<\EOF > xg-js-5.js 7// the following except is stolen from json2.js 8var cx = /[\u0000\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 9 escapable = /[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g, 10 gap, 11 txt1 = _("Expected translation string #1"), 12 indent, 13 meta = { // table of character substitutions 14 '\b': '\\b', 15 '\t': '\\t', 16 '\n': '\\n', 17 '\f': '\\f', 18 '\r': '\\r', 19 '"' : '\\"', 20 '\\': '\\\\' + _("Expected translation string #2") 21 }, 22 txt2 = _("Expected translation string #3"), 23 rep; 24var matched = curnodepath.match('^\\'+path+'\\/([\\w\\s]+)') \ 25 + _("Expected translation string #4"); 26EOF 27 28: ${XGETTEXT=xgettext} 29${XGETTEXT} --add-comments --no-location -o xg-js-5.tmp xg-js-5.js 2>xg-js-5.err 30test $? = 0 || { cat xg-js-5.err; Exit 1; } 31func_filter_POT_Creation_Date xg-js-5.tmp xg-js-5.pot 32 33cat <<\EOF > xg-js-5.ok 34# SOME DESCRIPTIVE TITLE. 35# Copyright (C) YEAR THE PACKAGE'S COPYRIGHT HOLDER 36# This file is distributed under the same license as the PACKAGE package. 37# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR. 38# 39#, fuzzy 40msgid "" 41msgstr "" 42"Project-Id-Version: PACKAGE VERSION\n" 43"Report-Msgid-Bugs-To: \n" 44"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" 45"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n" 46"Language-Team: LANGUAGE <LL@li.org>\n" 47"Language: \n" 48"MIME-Version: 1.0\n" 49"Content-Type: text/plain; charset=CHARSET\n" 50"Content-Transfer-Encoding: 8bit\n" 51 52msgid "Expected translation string #1" 53msgstr "" 54 55msgid "Expected translation string #2" 56msgstr "" 57 58msgid "Expected translation string #3" 59msgstr "" 60 61msgid "Expected translation string #4" 62msgstr "" 63EOF 64 65: ${DIFF=diff} 66${DIFF} xg-js-5.ok xg-js-5.pot 67result=$? 68 69exit $result 70