" (C) 2010-2011 by Holger Hans Peter Freyther All Rights Reserved This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program 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 Affero General Public License for more details. You should have received a copy of the GNU Affero General Public License along with this program. If not, see . " PackageLoader fileInPackage: 'PetitParserTests'. PP.PPCompositeParserTest subclass: MGCPGrammarTest [ MGCPGrammarTest class >> packageNamesUnderTest [ ^#('MGCPGrammar') ] parserClass [ ^MGCPGrammar ] testCommand [ | res nl | nl := Character cr asString, Character nl asString. res := self parse: 'AUEP 23444 address@hidden MGCP 1.0', nl, 'K: 3445', nl, 'I: 233434', nl, 'L: p:20, a:GSM-EFR, nt:IN', nl, 'M: recvonly', nl, nl, 'v=0', nl, 'o=- 258696477 0 IN IP4 172.16.1.107', nl, 's=-', nl, 'c=IN IP4 172.16.1.107', nl, 't=0 0', nl, 'm=audio 6666 RTP/AVP 127', nl, 'a=rtpmap:127 GSM-EFR/8000/1', nl, 'a=ptime:20', nl, 'a=recvonly', nl, 'm=image 4402 udptl t38', nl, 'a=T38FaxVersion:0', nl, 'a=T38MaxBitRate:14400', nl. self assert: res size = 10. self assert: (res at: 1) = 'AUEP'. self assert: (res at: 3) = '23444'. self assert: (res at: 5) = #('13' $@ 'mgw'). res inspect. ] testReply [ | res nl | nl := Character cr asString, Character nl asString. res := self parse: '200 123456 OK', nl. ] ]