📄 testa8c.sh
字号:
################################################################################ UNIT TEST A8c FOR kocos.pl################################################################################ Test A8c - Checks if the program finds correct 3rd order # co-occurrences when target word is specified as a regex # Input - test-A8.count# Output - test-A8c.reqdecho "UNIT Test A8c -";echo " For kth order co-occurrence program kocos.pl";echo "Input - Source file from test-A8.count";echo "Output - Destination file from test-A8c.reqd";echo "Test - Checks if the program finds correct 3rd order";echo " co-occurrences when the target word is specified as a regex"; #=============================================================================# INPUT#=============================================================================set TestInput="test-A8.count";set Actual="test-A8c.reqd";#=============================================================================# RUN THE PROGRAM#============================================================================= kocos.pl --regex test-A8.regex --order 3 $TestInput > test-A8c.output#=============================================================================# SORT THE RESULTS AND COMPARE#=============================================================================sort test-A8c.output > t1sort $Actual > t2diff -w t1 t2 > variance#=============================================================================# RESULTS OF TESTA8c#=============================================================================if(-z variance) then echo "STATUS : OK Test Results Match.....";else echo "STATUS : ERROR Test Results don't Match...."; echo " When Tested Against $Actual - "; cat varianceendifecho ""/bin/rm -f t1 t2 variance#############################################################################
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -