Commit 31613277 authored by Grzegorz Kostkowski's avatar Grzegorz Kostkowski

Add missing test file and minor refactor in tests

parent bf78c3b4
Pipeline #57 failed with stage
in 14 minutes and 52 seconds
This diff is collapsed.
......@@ -2,6 +2,9 @@
set -o errexit
TESTFILE1_PL="1825.txt.tag.mwe.wosedon.xml"
TESTFILE1_EN="senseval2.ccl.xml"
test_shows_help() {
# check against any import errors, without starting tool
ccl_emo -h > /dev/null
......@@ -42,16 +45,23 @@ test_output_content() {
no_of_tests=5
out_path="out_test.xml"
echo "Starting $no_of_tests tests ..."
echo "1/$no_of_tests Check imports ..."
test_shows_help
echo "2/$no_of_tests Run for pl document ..."
test_process_doc "1825.txt.tag.mwe.wosedon.xml" "$out_path" "pl"
echo "3/$no_of_tests Check output for pl document ..."
echo -e "2/$no_of_tests Run for pl document:\n\t-> check if generates output file ..."
test_process_doc "$TESTFILE1_PL" "$out_path" "pl"
echo -e "3/$no_of_tests Verify result file for pl document:\
\n\t-> is not empty\n\t-> contains polarity & emotions anotations ..."
test_output_content "$out_path"
rm -f "$out_path"
echo "4/$no_of_tests Run for en document ..."
test_process_doc "senseval2.ccl.xml" "$out_path" "en"
echo "5/$no_of_tests Check output for en document ..."
echo -e "4/$no_of_tests Run for en document:\n\t-> check if generates output file ..."
test_process_doc "$TESTFILE1_EN" "$out_path" "en"
echo -e "5/$no_of_tests Verify result file for en document:\
\n\t-> is not empty\n\t-> contains polarity & emotions anotations ..."
test_output_content "$out_path"
# clean after test
......
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