aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/ael/ael-test
AgeCommit message (Collapse)AuthorFilesLines
2008-12-17Merged revisions 165071 via svnmerge from murf2-77/+77
https://origsvn.digium.com/svn/asterisk/trunk ........ r165071 | murf | 2008-12-16 22:04:56 -0700 (Tue, 16 Dec 2008) | 31 lines A possibly "horrible fix" for a "horribly broken" situation. As stuff shifts around in the asterisk code, the miscellaneous inclusions from the standalone stuff gets broken. There's no easy fix for this situation. I made sure that everything in utils builds without problem ***AND*** that aelparse runs the regressions correctly with the following make menuselect options both on and off: DONT_OPTIMIZE DEBUG_THREADS DEBUG_CHANNEL_LOCKS MALLOC_DEBUG MTX_PROFILE DEBUG_SCHEDULER DEBUG_THREADLOCALS DETECT_DEADLOCKS CHANNEL_TRACE I think from now on, I'm going to #undef all these features in the various utils native files; I guess I could do the same for the copied-in files, surrounded by STANDALONE ifdef. A standalone isn't going to care about threads, mutexes, etc. ........ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@165074 f38db490-d61c-443f-a65b-d21fe96a405b
2008-09-04Merged revisions 141115 via svnmerge from murf3-20/+34
https://origsvn.digium.com/svn/asterisk/trunk ................ r141115 | murf | 2008-09-04 17:31:41 -0600 (Thu, 04 Sep 2008) | 78 lines Merged revisions 141094 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r141094 | murf | 2008-09-04 17:15:07 -0600 (Thu, 04 Sep 2008) | 70 lines (closes issue #13357) Reported by: pj Tested by: murf (closes issue #13416) Reported by: yarns Tested by: murf If you find this message overly verbose, relax, it's probably not meant for you. This message is meant for probably only two people in the whole world: me, or the poor schnook that has to maintain this code because I'm either dead or unavailable at the moment. This fix solves two reports, both having to do with embedding a function call in a ${} construct. It was tricky because the funccall syntax has parenthesis () in it. And up till now, the 'word' token in the flex stuff didn't allow that, because it would tend to steal the LP and RP tokens. To be truthful, the "word" token was the trickiest, most unstable thing in the whole lexer. I was lucky it made this long without complaints. I had to choose every character in the pattern with extreme care, and I knew that someday I'd have to revisit it. Well, the day has come. So, my brilliant idea (and I'm being modest), was to use the surrounding ${} construct to make a state machine and capture everything in it, no matter what it contains. But, I have to now treat the word token like I did with comments, in that I turn the whole thing into a state-machine sort of spec, with new contexts "curlystate", "wordstate", and "brackstate". Wait a minute, "brackstate"? Yes, well, it didn't take very many regression tests to point out if I do this for ${} constructs, I also have to do it with the $[] constructs, too. I had to create a separate pcbstack2 and pcbstack3 because these constructs can occur inside macro argument lists, and when we have two state machines operating on the same structures we'd get problems otherwise. I guess I could have stopped at pcbstack2 and had the brackstate stuff share it, but it doesn't hurt to be safe. So, the pcbpush and pcbpop routines also now have versions for "2" and "3". I had to add the {KEYWORD} construct to the initial pattern for "word", because previously word would match stuff like "default7", because it was a longer match than the keyword "default". But, not any more, because the word pattern only matches only one or two characters now, and it will always lose. So, I made it the winner again by making an optional match on any of the keywords before it's normal pattern. I added another regression test to make sure we don't lose this in future edits, and had to fix just one regression, where it no longer reports a 'cascaded' error, which I guess is a plus. I've given some thought as to whether to apply these fixes to 1.4 and the 1.6.x releases, vs trunk; I decided to put it in 1.4 because one of the bug reports was against 1.4; and it is unexpected that AEL cannot handle this situation. It actually reduced the amount of useless "cascade" error messages that appeared in the regressions (by one line, ehhem). There is a possible side-effect in that it does now do more careful checking of what's in those ${} constructs, as far as matching parens, and brackets are concerned. Some users may find a an insidious problem and correct it this way. This should be exceedingly rare, I hope. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@141116 f38db490-d61c-443f-a65b-d21fe96a405b
2008-08-08Merged revisions 136746 via svnmerge from murf5-319/+317
https://origsvn.digium.com/svn/asterisk/trunk ................ r136746 | murf | 2008-08-07 18:48:35 -0600 (Thu, 07 Aug 2008) | 40 lines Merged revisions 136726 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r136726 | murf | 2008-08-07 18:15:34 -0600 (Thu, 07 Aug 2008) | 32 lines (closes issue #13236) Reported by: korihor Wow, this one was a challenge! I regrouped and ran a new strategy for setting the ~~MACRO~~ value; I set it once per extension, up near the top. It is only set if there is a switch in the extension. So, I had to put in a chunk of code to detect a switch in the pval tree. I moved the code to insert the set of ~~exten~~ up to the beginning of the gen_prios routine, instead of down in the switch code. I learned that I have to push the detection of the switches down into the code, so everywhere I create a new exten in gen_prios, I make sure to pass onto it the values of the mother_exten first, and the exten next. I had to add a couple fields to the exten struct to accomplish this, in the ael_structs.h file. The checked field makes it so we don't repeat the switch search if it's been done. I also updated the regressions. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@136778 f38db490-d61c-443f-a65b-d21fe96a405b
2008-06-03Merged revisions 119998 via svnmerge from murf11-1449/+1532
https://origsvn.digium.com/svn/asterisk/trunk ................ r119998 | murf | 2008-06-03 09:49:34 -0600 (Tue, 03 Jun 2008) | 16 lines Merged revisions 119966 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r119966 | murf | 2008-06-03 09:26:56 -0600 (Tue, 03 Jun 2008) | 8 lines Updated the regressions on AEL. Hadn't updated this for the changes I made to preserve ${EXTEN} in switches, which affected several tests because it adds extra priorities, and at least one needed to be updated because of the removal of the empty extension warning message. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@120000 f38db490-d61c-443f-a65b-d21fe96a405b
2008-03-18Merged revisions 109357 via svnmerge from murf13-0/+99
https://origsvn.digium.com/svn/asterisk/trunk ................ r109357 | murf | 2008-03-18 08:09:50 -0600 (Tue, 18 Mar 2008) | 25 lines Merged revisions 109309 via svnmerge from https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r109309 | murf | 2008-03-18 00:37:15 -0600 (Tue, 18 Mar 2008) | 17 lines (closes issue #11903) Reported by: atis Many thanks to atis for spotting this problem and reporting it. The fix was to straighten out how items are placed on and removed from the file stack. Regressions as well as the provided test case helped to straighten out all code paths. valgrind was used to make sure all memory allocated was freed. Sorry for not solving this earlier. I got distracted. Added the ntest23 regression test, which is mainly a copy of ntest22, but with a few juicy errors thrown in, to replicate the kind of error that atis spotted. ........ ................ git-svn-id: http://svn.digium.com/svn/asterisk/branches/1.6.0@109397 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-27made AEL 8-bit transparent; mainly the lexer was tossing chars with the ↵murf19-358/+339
hi-order bit set. Not nice. Also, allow @ in extension names, and a backslash, also. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89682 f38db490-d61c-443f-a65b-d21fe96a405b
2007-11-26Change all instances of "CALLERID(number)" to "CALLERID(num)" formmichelson5-23/+23
consistency's sake (closes issue #11381, reported and patched by jon) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@89621 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-26Merged revisions 87168 via svnmerge from murf2-12/+11
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r87168 | murf | 2007-10-26 10:34:02 -0600 (Fri, 26 Oct 2007) | 1 line closes issue #11086 where a user complains that references to following contexts report a problem; The problem was REALLy that he was referring to empty contexts, which were being ignored. Reporter stated that empty contexts should be OK. I checked it out against extensions.conf, and sure enough, empty contexts ARE ok. So, I removed the restriction from AEL. This, though, highlighted a problem with multiple contexts of the same name. This should be OK, also. So, I added the extend keyword to AEL, and it can preceed the 'context' keyword (mixed with 'abstract', if nec.). This will turn off the warnings in AEL if the same context name is used 2 or more times. Also, I now call ast_context_find_or_create for contexts now, instead of just ast_context_create; I did this because pbx_config does this. The 'extend' keyword thus becomes a statement of intent. AEL can now duplicate the behavior of pbx_config, ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@87187 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-24closes issue #11005, where #include uses the current dir instead of the ↵murf4-51/+51
config dir (/etc/asterisk) for relative path includes for AEL git-svn-id: http://svn.digium.com/svn/asterisk/trunk@86967 f38db490-d61c-443f-a65b-d21fe96a405b
2007-10-03Merged revisions 84511 via svnmerge from murf9-83/+170
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r84511 | murf | 2007-10-03 08:23:00 -0600 (Wed, 03 Oct 2007) | 1 line closes issue #10834 ; where a null input to a switch statement results in a hangup; since switch is implemented with extensions, and the default case is implemented with a '.', and the '.' matches 1 or more remaining characters, the case where 0 characters exist isn't matched, and the extension isn't matched, and the goto fails, and a hangup occurs. Now, when a default case is generated, it also generates a single fixed extension that will match a null input. That extension just does a goto to the default extension for that switch. I played with an alternate solution, where I just tack an extra char onto all the patterns and the goto, but not the default case's pattern. Then even a null input will still have at least one char in it. But it made me nervous, having that extra char in , even if that's a pretty secret and low-level issue. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84512 f38db490-d61c-443f-a65b-d21fe96a405b
2007-09-29the last commit for AEL affected a small number of tests. Added a regression ↵murf16-144/+274
test for glob'd includes git-svn-id: http://svn.digium.com/svn/asterisk/trunk@84134 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-23an unreported crash I debugged, looked like it was backing up way too far ↵murf3-59/+42
after hitting the syntax error. An inspection of the code revealed that error tokens in lists were not rearranged when the rules were rearranged as part of a code neatening-up process. By moving the error tokens to where they should be, I also reduced the number of shift/reduce conflicts to 3 instead of 8. This introduces subtle differences in error messages, so the regressions had to be updated. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@80649 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-15This commit closes bug 7605, and half-closes 7638. The AEL code has been ↵murf13-264/+285
redistributed/repartitioned to allow code re-use both inside and outside of Asterisk. This commit introduces the utils/conf2ael program, and an external config-file reader, for both normal config files, and for extensions.conf (context, exten, prio); It provides an API for programs outside of asterisk to use to play with the dialplan and config files. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79595 f38db490-d61c-443f-a65b-d21fe96a405b
2007-08-14Merged revisions 79255 via svnmerge from murf15-1974/+2024
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r79255 | murf | 2007-08-13 11:49:54 -0600 (Mon, 13 Aug 2007) | 1 line This patch fixes bug 10411. I added a new regression test, some regression test cleanups ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@79392 f38db490-d61c-443f-a65b-d21fe96a405b
2007-05-03Merged revisions 62883 via svnmerge from murf2-0/+20
https://origsvn.digium.com/svn/asterisk/branches/1.4 ........ r62883 | murf | 2007-05-03 07:54:56 -0600 (Thu, 03 May 2007) | 1 line These mods fix bug 9623, where an '@' in the eswitch contents causes a syntax error. I also updated the regressions. ........ git-svn-id: http://svn.digium.com/svn/asterisk/trunk@62911 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-26added the no. 18 regression testmurf2-0/+52
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59236 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-26updated the regressions with regards to 9373, the crash on double contexts, ↵murf5-915/+1307
and brought other regressions up to date git-svn-id: http://svn.digium.com/svn/asterisk/trunk@59234 f38db490-d61c-443f-a65b-d21fe96a405b
2007-03-03updated the regression testsmurf6-177/+183
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@57708 f38db490-d61c-443f-a65b-d21fe96a405b
2006-11-13Eager people beat me to fixing the messed if, but we all forgot to update ↵murf1-12/+9
the regressions. Until now. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@47566 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-13Correction for bug 8128 in trunkmurf3-8/+194
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@45078 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-04These changes resolve the problems in bug 8090, where there's a crash ↵murf2-0/+18
compiling an empty context git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44377 f38db490-d61c-443f-a65b-d21fe96a405b
2006-10-03These changes correspond to the changes to app_stack's Gosub() applicationmurf15-330/+328
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@44263 f38db490-d61c-443f-a65b-d21fe96a405b
2006-09-27This commits the changes to AEL to use the gosub-with-args from Tilghman to ↵murf12-388/+606
perform macro calls. This results in substantially smaller stack footprint, which allows macro call depths in excess of 100,000 levels, rather than the limit of 7 calls deep, which the Macro app is subject to. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@43747 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-31This commit is a basic AEL enhancement: c-style commentsmurf5-15/+857
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41527 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-25Changes to fix all problems reported in 7804 are included here.murf2-0/+31
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@41150 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-12This commit merges the contents of 7721, as it applied to the trunk version. ↵murf1-1/+1
Added the item that would previously trigger a false error to test1. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39571 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-11added a -q for quiet, option to aelparsemurf12-164/+128
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39543 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-09This bug adds enhancement as per bug 7606, the -wmurf21-235/+7171
option to aelparse. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39430 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-07The contents of branch teams/murf/bug_7598 are being folded in here.murf6-29/+361
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@39151 f38db490-d61c-443f-a65b-d21fe96a405b
2006-08-01This branch will resolve the bug 7635.murf2-0/+49
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@38652 f38db490-d61c-443f-a65b-d21fe96a405b
2006-07-06OK, here is everything I changed to fix 7474:murf3-0/+57
1. ael/ael.flex -- the "fix" is here. In short, I modified the pattern for the chars that break args, to exclude those chars that would normally break args if they are preceded by a backslash. I did this to 3 patterns where really, this kind of exclusion should be placed. 2. ael_lex.c is an updated output from lex. 3. the ael-test stuff -- instituted a regression test for this condition. as ael_ntest9. The "n" in the name means that instead of just getting the syntax/semantic errors and high-level output from aelparse, we also want the compilation results to be in the comparison file. (remove the -n option). git-svn-id: http://svn.digium.com/svn/asterisk/trunk@37255 f38db490-d61c-443f-a65b-d21fe96a405b
2006-06-18merge changes from team/murf/AEL-trunk-fixesonlyrussell9-78/+111
- fix callerid matching for extensions - fix nested switch statements - fix compilation with bison 2.1a or higher (issue #7309) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@34665 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-28make the 'runtest' filter less strict on line numbers.rizzo1-3/+9
git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23154 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-28- fix miscalculation in column numbers when multiple tabsrizzo1-2/+6
or empty lines are involved; - change linku1() to return the head of the list (unused at the moment); - ignore the source line number in runtests as they change with the source and cause mismatches in the comparison with the reference output. git-svn-id: http://svn.digium.com/svn/asterisk/trunk@23130 f38db490-d61c-443f-a65b-d21fe96a405b
2006-04-24Merge Steve Murphy's (murf) complete re-implementation of AEL, which is now ↵kpfleming23-0/+5914
no longer considered experimental :-) git-svn-id: http://svn.digium.com/svn/asterisk/trunk@22273 f38db490-d61c-443f-a65b-d21fe96a405b