libosmocore/tests/vty
Neels Hofmeyr b55f4d2df2 vty: enable optional-multi-choice syntax: [(one|two)]
Since very recently we sensibly handle commands like

  cmd ([one]|[two]|[three])

as optional multi-choice arguments. In addition, support the more obvious
syntax of

  cmd [(one|two|three)]

Internally, the tokens are mangled to [one] [two] and [three], which is how the
rest of the code detects optional args, and makes sense in terms of UI:

  > cmd ?
  [one]
  [two]
  [three]

(i.e. optional arguments are always shown in braces in '?' listings)

Before this patch, commands defined with a syntax like [(one|two)], would lead
to an assertion (shows as "multiple") during program startup.

Change-Id: I952b3c00f97e2447f2308b0ec6f5f1714692b5b2
2019-02-04 16:43:57 +00:00
..
fail_not_de-indented.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
fail_tabs_and_spaces.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
fail_too_much_indent.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_empty_parent.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_ignore_blank.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_ignore_comment.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_indented_root.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_more_spaces.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_tabs.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
ok_tabs_and_spaces.cfg vty_test: add artificial node levels for better testing 2017-09-20 03:32:24 +02:00
vty_test.c vty: fix use-after-free and memleaks in is_cmd_ambiguous() 2018-07-11 15:47:08 +02:00
vty_test.ok vty: fix use-after-free and memleaks in is_cmd_ambiguous() 2018-07-11 15:47:08 +02:00
vty_transcript_test.c vty: enable optional-multi-choice syntax: [(one|two)] 2019-02-04 16:43:57 +00:00
vty_transcript_test.vty vty: enable optional-multi-choice syntax: [(one|two)] 2019-02-04 16:43:57 +00:00