[Asterisk-code-review] app_read: add tests for terminator only digit string. (testsuite[18])
Friendly Automation
asteriskteam at digium.com
Mon Feb 27 13:53:08 CST 2023
Friendly Automation has submitted this change. ( https://gerrit.asterisk.org/c/testsuite/+/19884 )
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(-)
Approvals:
Joshua Colp: Looks good to me, but someone else must approve
George Joseph: Looks good to me, approved
N A: Looks good to me, but someone else must approve
Friendly Automation: Approved for Submit
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/+/19884
To unsubscribe, or for help writing mail filters, visit https://gerrit.asterisk.org/settings
Gerrit-Project: testsuite
Gerrit-Branch: 18
Gerrit-Change-Id: Idd6d25cf83fa5d0a3e035f7a47ce2628486ea9e8
Gerrit-Change-Number: 19884
Gerrit-PatchSet: 2
Gerrit-Owner: Michael Bradeen <mbradeen at sangoma.com>
Gerrit-Reviewer: Friendly Automation
Gerrit-Reviewer: George Joseph <gjoseph at digium.com>
Gerrit-Reviewer: Joshua Colp <jcolp at sangoma.com>
Gerrit-Reviewer: N A <asterisk at phreaknet.org>
Gerrit-MessageType: merged
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-code-review/attachments/20230227/a1f6c307/attachment-0001.html>
More information about the asterisk-code-review
mailing list