1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 2*4882a593Smuzhiyun""" 3*4882a593SmuzhiyunBasic choice tests. 4*4882a593Smuzhiyun 5*4882a593SmuzhiyunThe handling of 'choice' is a bit complicated part in Kconfig. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThe behavior of 'y' choice is intuitive. If choice values are tristate, 8*4882a593Smuzhiyunthe choice can be 'm' where each value can be enabled independently. 9*4882a593SmuzhiyunAlso, if a choice is marked as 'optional', the whole choice can be 10*4882a593Smuzhiyuninvisible. 11*4882a593Smuzhiyun""" 12*4882a593Smuzhiyun 13*4882a593Smuzhiyun 14*4882a593Smuzhiyundef test_oldask0(conf): 15*4882a593Smuzhiyun assert conf.oldaskconfig() == 0 16*4882a593Smuzhiyun assert conf.stdout_contains('oldask0_expected_stdout') 17*4882a593Smuzhiyun 18*4882a593Smuzhiyun 19*4882a593Smuzhiyundef test_oldask1(conf): 20*4882a593Smuzhiyun assert conf.oldaskconfig('oldask1_config') == 0 21*4882a593Smuzhiyun assert conf.stdout_contains('oldask1_expected_stdout') 22*4882a593Smuzhiyun 23*4882a593Smuzhiyun 24*4882a593Smuzhiyundef test_allyes(conf): 25*4882a593Smuzhiyun assert conf.allyesconfig() == 0 26*4882a593Smuzhiyun assert conf.config_contains('allyes_expected_config') 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun 29*4882a593Smuzhiyundef test_allmod(conf): 30*4882a593Smuzhiyun assert conf.allmodconfig() == 0 31*4882a593Smuzhiyun assert conf.config_contains('allmod_expected_config') 32*4882a593Smuzhiyun 33*4882a593Smuzhiyun 34*4882a593Smuzhiyundef test_allno(conf): 35*4882a593Smuzhiyun assert conf.allnoconfig() == 0 36*4882a593Smuzhiyun assert conf.config_contains('allno_expected_config') 37*4882a593Smuzhiyun 38*4882a593Smuzhiyun 39*4882a593Smuzhiyundef test_alldef(conf): 40*4882a593Smuzhiyun assert conf.alldefconfig() == 0 41*4882a593Smuzhiyun assert conf.config_contains('alldef_expected_config') 42