Add additional namespaces for Google Talk which are used for the gmail client.
[asterisk/asterisk.git] / tests / test_gosub.c
index e65ebbc..36573fa 100644 (file)
@@ -51,12 +51,24 @@ AST_TEST_DEFINE(test_gosub)
                const char *args;
                const char *expected_value;
        } testplan[] = {
+               { NULL, "${STACK_PEEK(1,e,1)}", "" },         /* Stack is empty */
                { "Gosub", "tests_test_gosub_virtual_context,s,1" },
+               { NULL, "${PRIORITY}", "1" },
                { NULL, "${EXTEN}", "s" },
+               { NULL, "${STACK_PEEK(1,e,1)}", "" },         /* No extension originally */
                { "Gosub", "test,dne,1", (const char *) -1 }, /* This is the only invocation that should fail. */
+               { NULL, "${PRIORITY}", "1" },
                { NULL, "${EXTEN}", "s" },
                { "Gosub", "tests_test_gosub_virtual_context,s,1(5,5,5,5,5)" },
+               { NULL, "${PRIORITY}", "1" },
                { NULL, "$[0${ARG1} + 0${ARG5}]", "10" },
+               { NULL, "${STACK_PEEK(1,e)}", "s" },
+               { NULL, "${STACK_PEEK(1,c)}", "tests_test_gosub_virtual_context" },
+               { NULL, "${STACK_PEEK(1,p)}", "1" },
+               { NULL, "${STACK_PEEK(1,l)}", "tests_test_gosub_virtual_context,s,1" },
+               { "StackPop", "" },
+               { NULL, "${STACK_PEEK(1,e,1)}", "" },         /* Only 1 frame deep, my caller is top-level */
+               { "Gosub", "tests_test_gosub_virtual_context,s,1(5,5,5,5,5)" },
                { "Gosub", "tests_test_gosub_virtual_context,s,1(4,4,4,4)" },
                { NULL, "$[0${ARG1} + 0${ARG5}]", "4" },
                { NULL, "$[0${ARG1} + 0${ARG4}]", "8" },