diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-06 08:30:08 +0200 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2015-06-06 08:31:38 +0200 |
| commit | a14311449c96af03be515c561bc5b618f01aea7b (patch) | |
| tree | a285584df134ee6f67a9a0b00fd397fb7eb5d91d | |
| parent | 8b8c12a5f92f3cb3fe4cca49e7f3238068d9c646 (diff) | |
Improve get_help() test coverage.
In preparation for some changes.
| -rw-r--r-- | tests/Ktext | 25 | ||||
| -rw-r--r-- | testsuite.py | 6 |
2 files changed, 30 insertions, 1 deletions
diff --git a/tests/Ktext b/tests/Ktext index aa0f974..a4c43fe 100644 --- a/tests/Ktext +++ b/tests/Ktext @@ -1,6 +1,11 @@ config NO_HELP bool +config EMPTY_HELP + bool + help +config DUMMY + config S bool help @@ -23,3 +28,23 @@ comment "a comment" menu "a menu" endmenu + +# Tricker help text + +config TRICKY_HELP + bool + help + + + a + b + c + + d + e + f + + + g + h + i diff --git a/testsuite.py b/testsuite.py index 820382c..e3ce259 100644 --- a/testsuite.py +++ b/testsuite.py @@ -427,10 +427,14 @@ def run_selftests(): c = kconfiglib.Config("Kconfiglib/tests/Ktext") - verify_equals(c["S"].get_name(), "S") verify_equals(c["NO_HELP"].get_help(), None) + verify_equals(c["EMPTY_HELP"].get_help(), "") + verify_equals(c["TRICKY_HELP"].get_help(), + "a\n b\n c\n\n d\n e\n f\n\n\ng\n h\n i\n") verify_equals(c["S"].get_help(), "help for\nS\n") verify_equals(c.get_choices()[0].get_help(), "help for\nC\n") + + verify_equals(c["S"].get_name(), "S") verify_equals(c.get_comments()[0].get_text(), "a comment") verify_equals(c.get_menus()[0].get_title(), "a menu") |
