]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
New set/show testing framework (gdb.base/settings.exp)
authorPedro Alves <palves@redhat.com>
Wed, 12 Jun 2019 23:06:52 +0000 (00:06 +0100)
committerPedro Alves <palves@redhat.com>
Wed, 12 Jun 2019 23:12:20 +0000 (00:12 +0100)
commitdca0f6c0a4bafff9039d8bdb2a7efec9f70ce82f
tree6e37488519b942242e3b775854eb4ad6a7be3baa
parentccf46844d3e5ad4af9f3a10cc0599c939138d566
New set/show testing framework (gdb.base/settings.exp)

This commit adds new representative commands for all types of settings
commands supported by gdb (enum var_types), and then uses them to
exercise settings parsing and completion.

  (gdb) maint test-settings s[TAB]
  set   show

  (gdb) maint test-settings set [TAB]
  auto-boolean         integer              uinteger
  boolean              optional-filename    zinteger
  enum                 string               zuinteger
  filename             string-noescape      zuinteger-unlimited

  (gdb) maint test-settings set enum [TAB]
  xxx  yyy  zzz

  etc.

This is basically unit testing, except that it goes fully via GDB.  It
must be done this way in order to exercise TAB completion properly,
which must go via readline.

gdb/ChangeLog:
2019-06-13  Pedro Alves  <palves@redhat.com>

* Makefile.in (COMMON_SFILES): Add maint-test-settings.c.
* NEWS: Mention maint test-settings KIND.
* maint-test-settings.c: New file.

gdb/doc/ChangeLog:
2019-06-13  Pedro Alves  <palves@redhat.com>

* gdb.texinfo (Maintenance Commands): Document "maint
test-settings" commands.

gdb/testsuite/ChangeLog:
2019-06-13  Pedro Alves  <palves@redhat.com>

* gdb.base/settings.c: New file.
* gdb.base/settings.exp: New file.
gdb/ChangeLog
gdb/Makefile.in
gdb/NEWS
gdb/doc/ChangeLog
gdb/doc/gdb.texinfo
gdb/maint-test-settings.c [new file with mode: 0644]
gdb/testsuite/ChangeLog
gdb/testsuite/gdb.base/settings.c [new file with mode: 0644]
gdb/testsuite/gdb.base/settings.exp [new file with mode: 0644]