#! /bin/sh . "${srcdir=.}/init.sh"; path_prepend_ . ../src # Tests for the general string extraction facilities of the Perl backend # (with option --extract-all). cat <<\EOPERL > xg-pl-4.pl use strict; # A double quoted string. print "'Your command, please?', asked the waiter.\n"; # A double quoted string with interpolations. my $polite = 'please'; print "'Your recommendation, $polite?', answered the guest.\n"; # A reference. my $ref1 = \$polite; my $ref2 = \$ref1; my $ref3 = \$ref2; print "Yes, $$$$ref3!\n"; # The qq operator and some of the more esoteric string interpolation # features of Perl. print (qq {\uU\lp \LaNd\E \ldo\lWn, \Uoh\E, yeah\Q!!!\E\\!\n}); # The q operator. print q. >; # Should not be found. { $polite =~ qr?le? } # List interpolation. print "Your Perl include path starts with '$INC[0]' and it " . "ends with '$INC[-1]'. $#INC directories are searched.\n"; # Here documents. print < xg-pl-4.pot || Exit 1 cat <<\EOF > xg-pl-4.ok msgid "'Your command, please?', asked the waiter.\n" msgstr "" msgid "please" msgstr "" msgid "'Your recommendation, $polite?', answered the guest.\n" msgstr "" msgid "Yes, $$$$ref3!\n" msgstr "" msgid "Up and down, OH, yeah\\!\\!\\!\\!\n" msgstr "" msgid "E-Mail: . " msgstr "" msgid "" "Your Perl include path starts with '$INC[0]' and it ends with '$INC[-1]'. " "$#INC directories are searched.\n" msgstr "" msgid "" "Line 1\n" "Line 2\n" msgstr "" msgid "Line 1\\nStill line 1\n" msgstr "" msgid "Hello" msgstr "" msgid "@{[hello_func]} world!\n" msgstr "" msgid "ls $0" msgstr "" msgid "Polina rules!\n" msgstr "" EOF : ${DIFF=diff} ${DIFF} xg-pl-4.ok xg-pl-4.pot result=$? exit $result