Merge tag 'block-5.11-2021-01-10' of git://git.kernel.dk/linux-block
[linux/fpc-iii.git] / scripts / kconfig / tests / choice / __init__.py
blob4318fce05912f4bde7df5cabb1b67be5113ce9a3
1 # SPDX-License-Identifier: GPL-2.0
2 """
3 Basic choice tests.
5 The handling of 'choice' is a bit complicated part in Kconfig.
7 The behavior of 'y' choice is intuitive. If choice values are tristate,
8 the choice can be 'm' where each value can be enabled independently.
9 Also, if a choice is marked as 'optional', the whole choice can be
10 invisible.
11 """
14 def test_oldask0(conf):
15 assert conf.oldaskconfig() == 0
16 assert conf.stdout_contains('oldask0_expected_stdout')
19 def test_oldask1(conf):
20 assert conf.oldaskconfig('oldask1_config') == 0
21 assert conf.stdout_contains('oldask1_expected_stdout')
24 def test_allyes(conf):
25 assert conf.allyesconfig() == 0
26 assert conf.config_contains('allyes_expected_config')
29 def test_allmod(conf):
30 assert conf.allmodconfig() == 0
31 assert conf.config_contains('allmod_expected_config')
34 def test_allno(conf):
35 assert conf.allnoconfig() == 0
36 assert conf.config_contains('allno_expected_config')
39 def test_alldef(conf):
40 assert conf.alldefconfig() == 0
41 assert conf.config_contains('alldef_expected_config')