Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/marian-nmt/marian-regression-tests.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-12-11 00:32:03 +0300
committerRoman Grundkiewicz <rgrundki@exseed.ed.ac.uk>2018-12-11 00:32:03 +0300
commitd74195f6c340c988255edf1d77cb6c40350462a0 (patch)
tree2226c8eafacc93d221343d6f04a80a2dc3c8d7ca
parent0f74ff247a492c9308c45fa2ba0c3226faf846f0 (diff)
Add test with empty lines for marian-server
-rw-r--r--tests/server/test_ende_with_empty_lines.sh25
-rw-r--r--tests/server/text.someempty.expected20
-rw-r--r--tests/server/text.someempty.in20
3 files changed, 65 insertions, 0 deletions
diff --git a/tests/server/test_ende_with_empty_lines.sh b/tests/server/test_ende_with_empty_lines.sh
new file mode 100644
index 0000000..7ac5b59
--- /dev/null
+++ b/tests/server/test_ende_with_empty_lines.sh
@@ -0,0 +1,25 @@
+#!/bin/bash
+
+# Exit on error
+set -e
+
+clean_up() {
+ kill $SERVER_PID
+}
+trap clean_up EXIT
+
+# Test code goes here
+$MRT_MARIAN/marian-server -c $MRT_MODELS/wmt16_systems/marian.en-de.yml -p 8765 > server.log 2>&1 &
+SERVER_PID=$!
+
+sleep 20
+
+python3 $MRT_MARIAN/../scripts/server/client_example.py -p 8765 < text.someempty.in > text.someempty.out
+kill $SERVER_PID
+
+$MRT_TOOLS/diff.sh text.someempty.out text.someempty.expected > text.someempty.diff
+test -e server.log
+grep -q "listening on port 8765" server.log
+
+# Exit with success code
+exit 0
diff --git a/tests/server/text.someempty.expected b/tests/server/text.someempty.expected
new file mode 100644
index 0000000..35a3239
--- /dev/null
+++ b/tests/server/text.someempty.expected
@@ -0,0 +1,20 @@
+Indien und Japan Ministerpräsidenten treffen sich in Tokio
+Indiens neuer Premierminister Nar@@ endra Modi trifft sein jap@@ anisches Pendant , Shin@@ zo Abe , in Tokio , um über wirtschaftliche und Sicherheits@@ beziehungen zu diskutieren , auf seinem ersten wichtigen Auslands@@ besuch seit der Wahl im Mai .
+Herr Modi ist auf einer fünft@@ ä@@ gigen Reise nach Japan , um die wirtschaftlichen Beziehungen zur dritt@@ größten Volkswirtschaft der Welt zu stärken .
++ + +
+auch Indien hofft angeblich auf eine Einigung zur Verteidigungs@@ kooperation beider Nationen .
+Kar@@ ra@@ tha Polizei nimmt 20-@@ Jährige nach Hochgeschwindigkeits@@ motor@@ en@@ jagd fest
++ + +
+die Verkehrs@@ polizei auf Pat@@ rou@@ ille in Kar@@ ra@@ tha an diesem Vormittag versuchte , über ein blau@@ es Motorrad zu ziehen , als sie sie entdeckten , sie erreichte 12@@ ,5 / h , wie sie aus einer Tankstelle an der Bath@@ tor@@ straße aus@@ zog .
+die Polizei meldet den Reiter dann nicht an und fuhr weiter bis zur Bur@@ ges@@ e-@@ Straße , bevor er in Busch@@ land fuhr , wodurch die Beamten aus den Augen verloren haben .
+das Motorrad und ein Mensch Treffer der Beschreibung des Rei@@ ters wurde dann in einem Haus auf Wal@@ cott Way in Bulgar@@ ra ges@@ ichtet .
+die Polizei von Kar@@ ra@@ tha hat einen 20-@@ jährigen Mann beauftragt , der es versäumt zu stoppen und leicht@@ sinnig fahren zu können .
++ + +
++ + +
+George Web@@ ster warf N@@ air@@ n und Pit@@ loch@@ ry Hotel@@ vergewal@@ tigung vor
++ + +
+George Web@@ ster , 28 , stellte sich bei einer Anhörung vor dem Ober@@ landes@@ gericht in Glasgow die Vorwürfe .
+er soll am 7. Juni 2013 eine Frau im schottischen Hotel in Pit@@ loch@@ ry in Per@@ th@@ shire vergewaltigt haben .
+es wird von Web@@ ster angegriffen , während sie &quot; bewusst@@ los , schlä@@ ft und unfähig ist , ihre Zustimmung zu geben &quot; .
+Web@@ ster ist dann angeklagt , eine zweite Frau im Golf View Hotel in N@@ air@@ n im Hochland am 4. Mai 2014 vergewaltigt zu haben .
++ + +
diff --git a/tests/server/text.someempty.in b/tests/server/text.someempty.in
new file mode 100644
index 0000000..f969985
--- /dev/null
+++ b/tests/server/text.someempty.in
@@ -0,0 +1,20 @@
+India and Japan prime ministers meet in Tokyo
+India &apos;s new prime minister , Nar@@ endra Modi , is meeting his Japanese counterpart , Shin@@ zo Abe , in Tokyo to discuss economic and security ties , on his first major foreign visit since winning May &apos;s election .
+Mr Modi is on a five-@@ day trip to Japan to strengthen economic ties with the third largest economy in the world .
+
+India is also reportedly hoping for a deal on defence collaboration between the two nations .
+Kar@@ ra@@ tha police arrest 20-@@ year-old after high speed motorcycle chase
+
+traffic police on patrol in Kar@@ ra@@ tha this morning tried to pull over a blue motorcycle when they spotted it reaching 12@@ 5km @/@ h as it pulled out of a service station on Bath@@ gate Road .
+police say the rider then failed to stop and continued on to Bur@@ ges@@ s Road before turning into bush@@ land , causing the officers to lose sight of it .
+the motorcycle and a person matching the description of the rider was then spotted at a house on Wal@@ cott Way in Bulgar@@ ra .
+Kar@@ ra@@ tha Police have charged a 20-@@ year-old man with failing to stop and reckless driving .
+
+
+George Web@@ ster accused of N@@ air@@ n and Pit@@ loch@@ ry hotel rap@@ es
+
+George Web@@ ster , 28 , faced the charges during a hearing at the High Court in Glasgow .
+he is alleged to have raped a woman at the Scotland &apos;s Hotel in Pit@@ loch@@ ry in Per@@ th@@ shire on June 7 , 2013 .
+it is claimed Web@@ ster attacked her while she was `` unconscious , asleep and incapable of giving consent . &apos;&apos;
+Web@@ ster is then charged with rap@@ ing a second woman at the Golf View Hotel in N@@ air@@ n in the Highlands on May 4 , 2014 .
+