Commit fa0b94d6 authored by Julien Pivotto's avatar Julien Pivotto

Add tests

Signed-off-by: Julien Pivotto's avatarJulien Pivotto <roidelapluie@inuits.eu>
parent f88b69fd
#!/bin/bash
set -e
results=$(mktemp)
exitcode=0
for i in tests/*;
do
name="$(basename $i)"
echo "-------------${name//?/-}"
echo "Running test $name"
echo "-------------${name//?/-}"
echo
tmpdir="$(mktemp -d)"
cp -rv $i/input/ "$tmpdir"
./tox.py "$tmpdir/input"
if diff "$tmpdir/input" "$i/output"
then
echo -e "Test $(basename $i) \e[1;32mSUCCESS\e[0m" | tee -a "$results"
else
echo -e "Test $(basename $i) \e[1;31mFAILURE\e[0m" | tee -a "$results"
exitcode=1
fi
echo
done
echo "------------"
echo "Test Results"
echo "------------"
echo
cat "$results"
exit $exitcode
<html>
<head>
<title>This is a test</title>
</head>
<body>
<p>This is a test of the ToX project.</p>
<p>This too.</p>
</body>
</html>
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-17 21:07+0200\n"
"PO-Revision-Date: 2016-07-17 21:08+0200\n"
"Last-Translator: <roidelapluie@localhost>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.13.0\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: index.en.xhtml+html.head.title:3
msgid "This is a test"
msgstr ""
#: index.en.xhtml+html.body.p:6
msgid "This is a test of the ToX project."
msgstr ""
#: index.en.xhtml+html.body.p:7
msgid "This too."
msgstr ""
<html>
<head>
<title>This is a test</title>
</head>
<body>
<p>This is a test of the ToX project.</p>
<p>This too.</p>
</body>
</html>
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-17 21:07+0200\n"
"PO-Revision-Date: 2016-07-17 21:08+0200\n"
"Last-Translator: <roidelapluie@localhost>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.13.0\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: index.en.xhtml+html.head.title:3
msgid "This is a test"
msgstr ""
#: index.en.xhtml+html.body.p:6
msgid "This is a test of the ToX project."
msgstr ""
#: index.en.xhtml+html.body.p:7
msgid "This too."
msgstr ""
<html>
<head>
<title>This is a test</title>
</head>
<body>
<p>This is a test of the ToX project.</p>
<p>This too.</p>
</body>
</html>
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-17 21:07+0200\n"
"PO-Revision-Date: 2016-07-17 21:08+0200\n"
"Last-Translator: <roidelapluie@localhost>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.13.0\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: index.en.xhtml+html.head.title:3
msgid "This is a test"
msgstr "Ceci est un test"
#: index.en.xhtml+html.body.p:6
msgid "This is a test of the ToX project."
msgstr "Ceci est un test du projet ToX"
#: index.en.xhtml+html.body.p:7
msgid "This too."
msgstr "Ceci aussi."
<html>
<head>
<title>This is a test</title>
</head>
<body>
<p>This is a test of the ToX project.</p>
<p>This too.</p>
</body>
</html>
<html>
<head>
<title>Ceci est un test</title>
</head>
<body>
<p>Ceci est un test du projet ToX</p>
<p>Ceci aussi.</p>
</body>
</html>
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-17 21:07+0200\n"
"PO-Revision-Date: 2016-07-17 21:08+0200\n"
"Last-Translator: <roidelapluie@localhost>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.13.0\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: index.en.xhtml+html.head.title:3
msgid "This is a test"
msgstr "Ceci est un test"
#: index.en.xhtml+html.body.p:6
msgid "This is a test of the ToX project."
msgstr "Ceci est un test du projet ToX"
#: index.en.xhtml+html.body.p:7
msgid "This too."
msgstr "Ceci aussi."
<html>
<head>
<title>This is a test</title>
</head>
<body>
<p>This is a test of the ToX project.</p>
<p>This too.</p>
</body>
</html>
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-17 21:07+0200\n"
"PO-Revision-Date: 2016-07-17 21:08+0200\n"
"Last-Translator: <roidelapluie@localhost>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.13.0\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: index.en.xhtml+html.head.title:3
msgid "This is a test"
msgstr "Ceci est un test"
#: index.en.xhtml+html.body.p:6
msgid "This is a test of the ToX project."
msgstr "Ceci est un test du projet ToX"
#: index.en.xhtml+html.body.p:7
msgid "This too."
msgstr ""
<html>
<head>
<title>This is a test</title>
</head>
<body>
<p>This is a test of the ToX project.</p>
<p>This too.</p>
</body>
</html>
msgid ""
msgstr ""
"Project-Id-Version: PACKAGE VERSION\n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2016-07-17 21:07+0200\n"
"PO-Revision-Date: 2016-07-17 21:08+0200\n"
"Last-Translator: <roidelapluie@localhost>\n"
"Language-Team: French\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=UTF-8\n"
"Content-Transfer-Encoding: 8bit\n"
"X-Generator: Translate Toolkit 1.13.0\n"
"Language: fr\n"
"Plural-Forms: nplurals=2; plural=(n > 1);\n"
#: index.en.xhtml+html.head.title:3
msgid "This is a test"
msgstr "Ceci est un test"
#: index.en.xhtml+html.body.p:6
msgid "This is a test of the ToX project."
msgstr "Ceci est un test du projet ToX"
#: index.en.xhtml+html.body.p:7
msgid "This too."
msgstr ""
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment