#! /bin/sh
. "${srcdir=.}/init.sh"; path_prepend_ . ../src

# Test that ngettext() does not crash when the plural form rule leads to
# a stack overflow.

# In fact, a stack overflow at parsing time is caught by the bison parser
# (plural.c, macro YYMAXDEPTH = 10000), and a stack overflow at evaluation
# time is caught as well (eval-plural.h, macro EVAL_MAXDEPTH = 100).

test -d plural-3-dir || mkdir plural-3-dir
test -d plural-3-dir/ll || mkdir plural-3-dir/ll
test -d plural-3-dir/ll/LC_MESSAGES || mkdir plural-3-dir/ll/LC_MESSAGES

# This one does not exceed YYMAXDEPTH, i.e. the parser succeeds, and we can
# test the stack consumption of plural_eval().

cat > plural-3-ll.po <<EOF
msgid ""
msgstr ""
"Project-Id-Version: dummy 0.0\n"
"PO-Revision-Date: 2023-09-22 12:51:48 CEST\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: lalala\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ASCII\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1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(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(n!=1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));\n"

msgid "X"
msgid_plural "Y"
msgstr[0] "x"
msgstr[1] "y"
EOF

: ${MSGFMT=msgfmt}
${MSGFMT} -o plural-3-dir/ll/LC_MESSAGES/plural.mo plural-3-ll.po || Exit 1

LANGUAGE= TEXTDOMAIN=plural TEXTDOMAINDIR=plural-3-dir \
$NGETTEXT --env LC_ALL=ll X Y 42 > dataout
test $? = 0 || Exit 1
test x = "`cat dataout`" || Exit 1

LANGUAGE= TEXTDOMAIN=plural TEXTDOMAINDIR=plural-3-dir \
$NGETTEXT --env LC_ALL=ll --thread X Y 42 > thread-dataout
test $? = 0 || Exit 1
test x = "`cat thread-dataout`" || Exit 1

# This one is large enough that YYMAXDEPTH is exceeded, i.e. the parser fails.

cat > plural-3-ll.po <<EOF
msgid ""
msgstr ""
"Project-Id-Version: dummy 0.0\n"
"PO-Revision-Date: 2023-09-22 12:51:48 CEST\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: lalala\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=ASCII\n"
"Content-Transfer-Encoding: 8bit\n"
"Plural-Forms: nplurals=2; plural=(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!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1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(!(1-(n!=1)))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))))));\n"

msgid "X"
msgid_plural "Y"
msgstr[0] "x"
msgstr[1] "y"
EOF

: ${MSGFMT=msgfmt}
${MSGFMT} -o plural-3-dir/ll/LC_MESSAGES/plural.mo plural-3-ll.po || Exit 1

LANGUAGE= TEXTDOMAIN=plural TEXTDOMAINDIR=plural-3-dir \
$NGETTEXT --env LC_ALL=ll X Y 42 > parserfail-dataout
test $? = 0 || Exit 1
test y = "`cat parserfail-dataout`" || Exit 1

LANGUAGE= TEXTDOMAIN=plural TEXTDOMAINDIR=plural-3-dir \
$NGETTEXT --env LC_ALL=ll --thread X Y 42 > thread-parserfail-dataout
test $? = 0 || Exit 1
test y = "`cat thread-parserfail-dataout`" || Exit 1

Exit 0
