[Asterisk-code-review] app_read: add tests for terminator only digit string. (testsuite[master])
Michael Bradeen
asteriskteam at digium.com
Mon Feb 27 10:26:27 CST 2023
Michael Bradeen has uploaded this change for review. ( https://gerrit.asterisk.org/c/testsuite/+/19912 )
Change subject: app_read: add tests for terminator only digit string.
......................................................................
app_read: add tests for terminator only digit string.
Add tests to ensure that the 'e' option includes the terminator digit
on terminator digit only strings, and that no 'e' option does not.
ASTERISK-30411
Change-Id: Idd6d25cf83fa5d0a3e035f7a47ce2628486ea9e8
---
M tests/apps/read/configs/ast1/extensions.conf
M tests/apps/read/test-config.yaml
2 files changed, 24 insertions(+), 2 deletions(-)
git pull ssh://gerrit.asterisk.org:29418/testsuite refs/changes/12/19912/1
diff --git a/tests/apps/read/configs/ast1/extensions.conf b/tests/apps/read/configs/ast1/extensions.conf
index 7fd4b53..11bf876 100644
--- a/tests/apps/read/configs/ast1/extensions.conf
+++ b/tests/apps/read/configs/ast1/extensions.conf
@@ -10,8 +10,10 @@
same => n,Set(GLOBAL(senddtmf7)=1234#56)
same => n,Set(GLOBAL(senddtmf8)=1234#56)
same => n,Set(GLOBAL(senddtmf9)=9876#56)
+ same => n,Set(GLOBAL(senddtmf10)=#)
+ same => n,Set(GLOBAL(senddtmf11)=#)
same => n,Set(i=0)
- same => n,While($[${INC(i)}<=9])
+ same => n,While($[${INC(i)}<=11])
same => n,Originate(Local/${i}@send-dtmf,exten,read-dtmf,${i},1,,a)
same => n,EndWhile()
same => n,Hangup()
@@ -51,6 +53,12 @@
exten => 9,1,Answer()
same => n,Read(digits,dial,,i)
same => n,GotoIf($["${digits}"="${senddtmf${EXTEN}:0:4}"]?success,1:fail,1)
+exten => 10,1,Answer()
+ same => n,Read(digits)
+ same => n,GotoIf($["${digits}"=""]?success,1:fail,1)
+exten => 11,1,Answer()
+ same => n,Read(digits,,,e)
+ same => n,GotoIf($["${digits}"="#"]?success,1:fail,1)
exten => success,1,Answer(1)
same => n,UserEvent(ReadSuccess,Result: Pass)
same => n,Hangup()
diff --git a/tests/apps/read/test-config.yaml b/tests/apps/read/test-config.yaml
index 6dba4ee..722d53a 100644
--- a/tests/apps/read/test-config.yaml
+++ b/tests/apps/read/test-config.yaml
@@ -42,7 +42,7 @@
requirements:
match:
Result: 'Pass'
- count: 9
+ count: 11
stop_test:
properties:
--
To view, visit https://gerrit.asterisk.org/c/testsuite/+/19912
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: master
Gerrit-Change-Id: Idd6d25cf83fa5d0a3e035f7a47ce2628486ea9e8
Gerrit-Change-Number: 19912
Gerrit-PatchSet: 1
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-MessageType: newchange
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230227/db92fb15/attachment.html>
More information about the asterisk-code-review
mailing list