aboutsummaryrefslogtreecommitdiffstats
path: root/pbx/ael/ael-test
diff options
context:
space:
mode:
authormurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-06 22:49:18 +0000
committermurf <murf@f38db490-d61c-443f-a65b-d21fe96a405b>2006-07-06 22:49:18 +0000
commit038813616f01f97561cfb07ac0138eccd73e486f (patch)
treeb3e271d6c8977746d980b1f845f04866c1d89d84 /pbx/ael/ael-test
parentc8019be99aff3b3041399d659861b95c18556bb1 (diff)
OK, here is everything I changed to fix 7474:
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
Diffstat (limited to 'pbx/ael/ael-test')
-rwxr-xr-xpbx/ael/ael-test/ael-ntest9/extensions.ael12
-rw-r--r--pbx/ael/ael-test/ref.ael-ntest929
-rwxr-xr-xpbx/ael/ael-test/runtests16
3 files changed, 57 insertions, 0 deletions
diff --git a/pbx/ael/ael-test/ael-ntest9/extensions.ael b/pbx/ael/ael-test/ael-ntest9/extensions.ael
new file mode 100755
index 000000000..b9762ed54
--- /dev/null
+++ b/pbx/ael/ael-test/ael-ntest9/extensions.ael
@@ -0,0 +1,12 @@
+
+context workext {
+ ignorepat => 8;
+ ignorepat => 9;
+ 793 => {
+ Set(QUERYSTRING=SELECT\ foo\,\ bar\ FROM\ foobar);
+ Verbose(2|${QUERYSTRING});
+ query="SELECT foo\, bar FROM foobar" ;
+ Verbose(2|${query}) ;
+ }
+}
+
diff --git a/pbx/ael/ael-test/ref.ael-ntest9 b/pbx/ael/ael-test/ref.ael-ntest9
new file mode 100644
index 000000000..c520b0d38
--- /dev/null
+++ b/pbx/ael/ael-test/ref.ael-ntest9
@@ -0,0 +1,29 @@
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+Executed ast_register_file_version();
+
+(You can use the -n option if you aren't interested in seeing all the instructions generated by the compiler)
+
+Executed ast_cli_register_multiple();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3453 func: pbx_load_module Starting AEL load process.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3460 func: pbx_load_module AEL load process: calculated config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3463 func: pbx_load_module AEL load process: parsed config file name './extensions.ael'.
+LOG: lev:2 file:../pbx/pbx_ael.c line:3466 func: pbx_load_module AEL load process: checked config file name './extensions.ael'.
+Executed ast_context_create(conts, name=workext, registrar=pbx_ael);
+Executed ast_context_add_ignorepat2(con, value=8, registrar=pbx_ael);
+Executed ast_context_add_ignorepat2(con, value=9, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=793, priority=1, label=(null), callerid=(null), appl=Set, data=QUERYSTRING=SELECT\ foo\,\ bar\ FROM\ foobar, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=793, priority=2, label=(null), callerid=(null), appl=Verbose, data=2|${QUERYSTRING}, FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=793, priority=3, label=(null), callerid=(null), appl=Set, data=query=$["SELECT foo\, bar FROM foobar" ], FREE, registrar=pbx_ael);
+Executed ast_add_extension2(con, rep=0, exten=793, priority=4, label=(null), callerid=(null), appl=Verbose, data=2|${query}, FREE, registrar=pbx_ael);
+LOG: lev:2 file:../pbx/pbx_ael.c line:3468 func: pbx_load_module AEL load process: compiled config file name './extensions.ael'.
+Executed ast_merge_contexts_and_delete();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3471 func: pbx_load_module AEL load process: merged config file name './extensions.ael'.
+Executed ast_walk_contexts();
+LOG: lev:2 file:../pbx/pbx_ael.c line:3474 func: pbx_load_module AEL load process: verified config file name './extensions.ael'.
+LOG: lev:4 file:ael2_parse line:253 func: main 1 contexts, 1 extensions, 4 priorities
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();
+Executed ast_unregister_file_version();
diff --git a/pbx/ael/ael-test/runtests b/pbx/ael/ael-test/runtests
index 441088eb3..b8772cdb4 100755
--- a/pbx/ael/ael-test/runtests
+++ b/pbx/ael/ael-test/runtests
@@ -21,4 +21,20 @@ for i in ael-test*; do
fi
done
+
+for i in ael-ntest*; do
+ echo -n Test: $i.................
+ (cd $i; ../../../../utils/aelparse -d | grep -v -i 'seconds' > ../res.$i)
+ do_filter < res.$i > $NEW
+ do_filter < ref.$i > $ORIG
+ if (diff -q $NEW $ORIG > /dev/null 2>&1 ) then
+ echo PASSED
+ rm res.$i
+ else
+ echo %%%%%%FAILED%%%%%%
+ # diff -u ref.$i res.$i
+ diff -u $ORIG $NEW
+ fi
+
+done
rm $NEW $ORIG