Skip to content

Commit

Permalink
add automatically test script.
Browse files Browse the repository at this point in the history
  • Loading branch information
Oneplus committed Mar 21, 2013
1 parent 9d00e5c commit 06d69e7
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions script/auto-test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/sh

SCRIPT_DIR=`pwd`
ROOT_DIR=$SCRIPT_DIR/..
BIN_DIR=$ROOT_DIR/bin
DATA_DIR=$ROOT_DIR/test_data

EXE=./ltp_test
OPT=all

cd $BIN_DIR

echo "[Running]";
$EXE $OPT $DATA_DIR/test_gb.txt > $DATA_DIR/test_gb.tmp
echo "[Finished]";

cd $DATA_DIR
diff $DATA_DIR/test_gb.xml $DATA_DIR/test_gb.tmp

if [ $? == 0 ] then
echo "[Failed] found diff between two version's output"
else
echo "[Passed] no diff"
fi

0 comments on commit 06d69e7

Please sign in to comment.