testa12c.sh
来自「N元组统计程序源代码」· Shell 代码 · 共 56 行
SH
56 行
################################################################################ UNIT TEST A12c FOR kocos.pl################################################################################ Test A12c - Checks if the program finds correct 3rd order # co-occurrences when target words end with nA # Input - test-A12.count# Output - test-A12c.reqdecho "UNIT Test A12c -";echo " For kth order co-occurrence program kocos.pl";echo "Input - Source file from test-A12.count";echo "Output - Destination file from test-A12c.reqd";echo "Test - Checks if the program finds correct 3rd order";echo " co-occurrences when the target words end with nA";#=============================================================================# INPUT#=============================================================================set TestInput="test-A12.count";set Actual="test-A12c.reqd";#=============================================================================# RUN THE PROGRAM#============================================================================= kocos.pl --regex test-A12.regex --order 3 $TestInput > test-A12c.output#=============================================================================# SORT THE RESULTS AND COMPARE#=============================================================================sort test-A12c.output > t1sort $Actual > t2diff -w t1 t2 > variance1#=============================================================================# RESULTS OF TESTA12c#=============================================================================if(-z variance1) then echo "STATUS : OK Test Results Match.....";else echo "STATUS : ERROR Test Results don't Match...."; echo " When Tested for --regex test-A12.regex "; cat variance1endifecho ""/bin/rm -f t1 t2 variance1 #############################################################################
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?