📄 tst
字号:
#!/bin/sh# This is a short-cut to execute tests on the parser.# ./conf/torture_msgs{,2} contain various kind of messages.#echo "=="#echo "== Testing the parser contained in libosip."#echo "== You can use the verbose mode (-v) to see the full message."#echo "=="ok=0nok=0i=0while [ $i -lt 89 ]doset +x #mpatrol -C -S -L -d --list -p --use-debug ./torture_test $1/sip$i 0 $2 ./torture_test $1/sip$i 0 $2 code=$? if [ "$code" -eq 0 ]; then echo "checking sip$i : passed"; ok=`expr $ok + 1`; else echo "checking sip$i : failed ($code)"; nok=`expr $nok + 1` fi; i=`expr $i + 1`doneecho "checked well formed messages: $i"echo "errors : $nok"#ok=0#nok=0##i=0#while [ $i -lt 9 ]#do#set +x# #mpatrol -C -S -L -d --list -p --use-debug ./torture_test ./res/sip-malformed$i 0 $1# ./torture_test $1/sip-malformed$i 0 $2# if [ "$?" -eq 0 ]; then# echo "checking sip$i : passed";# ok=`expr $ok + 1`;# else# echo "checking sip$i : failed";# nok=`expr $nok + 1`# fi;## i=`expr $i + 1`##done##echo "checked malformed messages: $i"#echo "errors : $ok"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -