📄 run_test_sip_msg
字号:
#! /bin/sh## Run the parser tests## usage: env srcdir=dir run_sip_test_msg## --------------------------------------------------------------------## This file is part of the Sofia-SIP package## Copyright (C) 2005 Nokia Corporation.## Contact: Pekka Pessi <pekka.pessi@nokia.com>## This library is free software; you can redistribute it and/or# modify it under the terms of the GNU Lesser General Public License# as published by the Free Software Foundation; either version 2.1 of# the License, or (at your option) any later version.## This library is distributed in the hope that it will be useful, but# WITHOUT ANY WARRANTY; without even the implied warranty of# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU# Lesser General Public License for more details.## You should have received a copy of the GNU Lesser General Public# License along with this library; if not, write to the Free Software# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA# 02110-1301 USA## --------------------------------------------------------------------#rc=0if test ! -d "${srcdir:=.}/tests"then echo Please set environment variable srcdir exit 77fitest=./test_sip_msg# These are messages that the parser should passgood="-t test1.txt test2.txt test3.txt test4.txt -u test5.txt -t test6.txt test7.txt -u test8.txt -t test9.txt test14.txt test20.txt test23.txt test24.txt test31.txt own1.txt own2.txt own3.txt own4.txt own5.txt own6.txt"# These are messages that the parser should failbad="test10.txt test11.txt test12.txt test13.txt test15.txt test16.txt test17.txt test18.txt test19.txt test21.txt test22.txt test26.txt test29.txt test33.txt test35.txt test40.txt"# These are ugly messages that parser should passugly="-t test25.txt -u test27.txt test28.txt -t test30.txt -u test32.txt test34.txt -t test36.txt -u test37.txt test38.txt test39.txt test41.txt test42.txt"# These are messages that parser should pass, but it does notgoodish=""# These are messages that parser should not pass, but it doesbaddish=""flag=-tfor n in $good $ugly;do if test $n = -t ; then flag=$n elif test $n = -u ; then flag= elif "$test" $flag < "$srcdir/tests/$n" > /dev/null ; then echo "PASS: $n" else echo "ERROR: $n"; rc=1 fidonefor n in $bad;do if "$test" -t < "$srcdir/tests/$n" > /dev/null 2>/dev/null ; then echo "ERROR: $n (no error detected)"; rc=1 else echo "PASS: $n" fidoneexit $rc
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -