Review at  https://gerrit.osmocom.org/5435

ctrl_test: add two more current parsing bugs to prep for fix

Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7
---
M tests/ctrl/ctrl_test.c
M tests/ctrl/ctrl_test.ok
2 files changed, 50 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.osmocom.org:29418/libosmocore refs/changes/35/5435/1

diff --git a/tests/ctrl/ctrl_test.c b/tests/ctrl/ctrl_test.c
index be412ea..86ede8b 100644
--- a/tests/ctrl/ctrl_test.c
+++ b/tests/ctrl/ctrl_test.c
@@ -155,6 +155,22 @@
                "ERROR 1 Command not found",
 
        },
+       { "GET 1 var\ti\table",
+               {
+                       .type = CTRL_TYPE_GET,
+                       .id = "1",
+                       .variable = "var\ti\table", /* current bug */
+               },
+               "ERROR 1 Command not found",
+       },
+       { "GET 1 var\ri\rable",
+               {
+                       .type = CTRL_TYPE_GET,
+                       .id = "1",
+                       .variable = "var\ri\rable", /* current bug */
+               },
+               "ERROR 1 Command not found",
+       },
        { "GET 1 variable value",
                {
                        .type = CTRL_TYPE_GET,
diff --git a/tests/ctrl/ctrl_test.ok b/tests/ctrl/ctrl_test.ok
index edf97ea..4a3a169 100644
--- a/tests/ctrl/ctrl_test.ok
+++ b/tests/ctrl/ctrl_test.ok
@@ -34,6 +34,24 @@
 handling:
 replied: 'ERROR 1 Command not found'
 ok
+test: 'GET 1 var\ti\table'
+parsing:
+id = '1'
+variable = 'var\ti\table'
+value = '(null)'
+reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
+ok
+test: 'GET 1 var\ri\rable'
+parsing:
+id = '1'
+variable = 'var\ri\rable'
+value = '(null)'
+reply = '(null)'
+handling:
+replied: 'ERROR 1 Command not found'
+ok
 test: 'GET 1 variable value'
 parsing:
 id = '1'
@@ -160,3 +178,19 @@
 handling:
 replied: 'ERROR \t Command not found'
 ok
+test: 'GET_REPLY 1 variable OK'
+parsing:
+id = '1'
+variable = 'variable'
+value = '(null)'
+reply = 'OK'
+handling:
+ok
+test: 'SET_REPLY 1 variable OK'
+parsing:
+id = '1'
+variable = 'variable'
+value = '(null)'
+reply = 'OK'
+handling:
+ok

-- 
To view, visit https://gerrit.osmocom.org/5435
To unsubscribe, visit https://gerrit.osmocom.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Id11bc326be2f0bc2746a928354e416495a18baf7
Gerrit-PatchSet: 1
Gerrit-Project: libosmocore
Gerrit-Branch: master
Gerrit-Owner: Neels Hofmeyr <[email protected]>

Reply via email to