summaryrefslogtreecommitdiffstats
path: root/tests/vty/vty_test.ok
diff options
context:
space:
mode:
authorNeels Hofmeyr <neels@hofmeyr.de>2017-09-19 23:54:01 +0200
committerNeels Hofmeyr <neels@hofmeyr.de>2017-09-20 00:57:33 +0200
commit430636328c2fbd9fffc0eac5114462c200b7f2cb (patch)
tree9fbbecedf50ee4ff28e994855fb7cbf077a11319 /tests/vty/vty_test.ok
parent4a31ffa2f0097d96201f80305a0495c57552f0ad (diff)
fix vty regression: empty parent node
The recent exit-by-indent patch breaks a VTY case where a node is entered but directly followed by a sibling or ancestor without listing any child nodes. Regression introduced by I24cbb3f6de111f2d31110c3c484c066f1153aac9. An example is a common usage in osmo-bts, where 'phy N' / 'instance N' is a parent node that is commonly left empty: phy 0 instance 0 bts 0 band 1800 Before this patch, this case produces the error: There is no such command. Error occurred during reading the below line: bts 0 Fix indentation parsing logic in command.c to accomodate this case. Add a unit test for empty parent node. Change-Id: Ia0880a17ae55accb092ae8585cc3a1bec9986891
Diffstat (limited to 'tests/vty/vty_test.ok')
-rw-r--r--tests/vty/vty_test.ok2
1 files changed, 2 insertions, 0 deletions
diff --git a/tests/vty/vty_test.ok b/tests/vty/vty_test.ok
index b2df1a11..f9fea34d 100644
--- a/tests/vty/vty_test.ok
+++ b/tests/vty/vty_test.ok
@@ -128,4 +128,6 @@ reading file fail_tabs_and_spaces.cfg, expecting rc=-22
got rc=-22
reading file ok_indented_root.cfg, expecting rc=0
got rc=0
+reading file ok_empty_parent.cfg, expecting rc=0
+got rc=0
All tests passed