<p>laforge <strong>merged</strong> this change.</p><p><a href="https://gerrit.osmocom.org/c/libosmocore/+/14307">View Change</a></p><div style="white-space:pre-wrap">Approvals:
  laforge: Looks good to me, but someone else must approve
  pespin: Looks good to me, approved
  Jenkins Builder: Verified

</div><pre style="font-family: monospace,monospace; white-space: pre-wrap;">vty_transcript_test.vty: add choice auto-complete tests<br><br>This patch is a result of discussion we had in [1]. The key idea<br>is that libosmovty should properly auto-complete the commands<br>containing choice, such as the following one:<br><br>  multi0 (one|two|three)<br><br>[1] If9b0c0d031477ca87786aab5c269d00748e896c8<br><br>Right now, sending the following command:<br><br>  (osmo-foo-bar)# multi0 th<br><br>would basically match the following vector:<br><br>  multi0 three<br><br>however the resulting argv would be:<br><br>  ["multi0", "th"]<br><br>Moreover, sending the following command:<br><br>  (osmo-foo-bar)# multi0 t<br><br>would basically match the following vectors:<br><br>  multi0 two<br>  multi0 three<br><br>because both start from 't', so the resulting argv would be:<br><br>  ["multi0", "t"]<br><br>which is ambiguous!<br><br>The expected output is:<br><br>  (osmo-foo-bar)# multi0 th<br>  ok argc=1 three<br><br>  (osmo-foo-bar)# multi0 t<br>  % Ambiguous command.<br><br>This is going to be fixed in the follow up patches.<br><br>Change-Id: I83c3aef813173952641035862c534ef16384780e<br>---<br>M tests/vty/vty_transcript_test.vty<br>1 file changed, 9 insertions(+), 0 deletions(-)<br><br></pre><pre style="font-family: monospace,monospace; white-space: pre-wrap;"><span>diff --git a/tests/vty/vty_transcript_test.vty b/tests/vty/vty_transcript_test.vty</span><br><span>index 57920a8..27dacdc 100644</span><br><span>--- a/tests/vty/vty_transcript_test.vty</span><br><span>+++ b/tests/vty/vty_transcript_test.vty</span><br><span>@@ -66,3 +66,12 @@</span><br><span> </span><br><span> vty_transcript_test> multi2</span><br><span> ok argc=0</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+vty_transcript_test> multi0 thr</span><br><span style="color: hsl(120, 100%, 40%);">+ok argc=1 thr</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+vty_transcript_test> multi1 on</span><br><span style="color: hsl(120, 100%, 40%);">+ok argc=1 on</span><br><span style="color: hsl(120, 100%, 40%);">+</span><br><span style="color: hsl(120, 100%, 40%);">+vty_transcript_test> multi2 t</span><br><span style="color: hsl(120, 100%, 40%);">+ok argc=1 t</span><br><span></span><br></pre><p>To view, visit <a href="https://gerrit.osmocom.org/c/libosmocore/+/14307">change 14307</a>. To unsubscribe, or for help writing mail filters, visit <a href="https://gerrit.osmocom.org/settings">settings</a>.</p><div itemscope itemtype="http://schema.org/EmailMessage"><div itemscope itemprop="action" itemtype="http://schema.org/ViewAction"><link itemprop="url" href="https://gerrit.osmocom.org/c/libosmocore/+/14307"/><meta itemprop="name" content="View Change"/></div></div>

<div style="display:none"> Gerrit-Project: libosmocore </div>
<div style="display:none"> Gerrit-Branch: master </div>
<div style="display:none"> Gerrit-Change-Id: I83c3aef813173952641035862c534ef16384780e </div>
<div style="display:none"> Gerrit-Change-Number: 14307 </div>
<div style="display:none"> Gerrit-PatchSet: 2 </div>
<div style="display:none"> Gerrit-Owner: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: Jenkins Builder </div>
<div style="display:none"> Gerrit-Reviewer: Neels Hofmeyr <nhofmeyr@sysmocom.de> </div>
<div style="display:none"> Gerrit-Reviewer: fixeria <axilirator@gmail.com> </div>
<div style="display:none"> Gerrit-Reviewer: laforge <laforge@gnumonks.org> </div>
<div style="display:none"> Gerrit-Reviewer: pespin <pespin@sysmocom.de> </div>
<div style="display:none"> Gerrit-MessageType: merged </div>