diff options
| author | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-12 13:03:50 +0100 |
|---|---|---|
| committer | Ulf Magnusson <ulfalizer@gmail.com> | 2012-12-12 13:03:50 +0100 |
| commit | f70d4202f33b685aabf797ff59dcbab849e0c62f (patch) | |
| tree | cd275120e1928cd25c1a2dee67548cf8a7743091 /testsuite.py | |
| parent | be416fbfb308d21509df13927763b0b62957e45f (diff) | |
Add selftests for get_mainmenu_text().
Diffstat (limited to 'testsuite.py')
| -rw-r--r-- | testsuite.py | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/testsuite.py b/testsuite.py index ceb6123..789fcf9 100644 --- a/testsuite.py +++ b/testsuite.py @@ -528,6 +528,22 @@ def run_selftests(): "Kconfiglib/tests/defconfig_2") # + # get_mainmenu_text() + # + + print "Testing get_mainmenu_text()..." + + c = kconfiglib.Config("Kconfiglib/tests/Kempty") + verify(c.get_mainmenu_text() is None, + "An empty Kconfig should not have a mainmenu text") + + # Expanded in the mainmenu text + os.environ["FOO"] = "bar baz" + c = kconfiglib.Config("Kconfiglib/tests/Kmainmenu") + verify(c.get_mainmenu_text() == "---bar baz---", + "Wrong mainmenu text") + + # # Misc. minor APIs # |
