4 test_checkbootparam() {
5 CMDLINE='foo=dingens bar foobar=blub'
9 assertEquals 'wrong retval for bootparam foobar' 0 ${retval}
13 assertEquals 'wrong retval for bootparam bar' 0 ${retval}
17 assertEquals 'wrong retval for bootparam foo' 0 ${retval}
19 checkbootparam dingens
21 assertEquals 'wrong retval for non-existing bootparam dingens' 1 ${retval}
25 assertEquals 'wrong retval for non-existing bootparam oops' 1 ${retval}
29 CMDLINE='test=dingens tester foo=dingens foobar=blub'
31 value=$(getbootparam foobar)
33 assertEquals 'unexpected value for botparam foobar' 'blub' ${value}
34 assertEquals 'unexpected retval' '0' ${retval}
36 value=$(getbootparam foo)
38 assertEquals 'unexpected value for bootparam foo' 'dingens' ${value}
39 assertEquals 'unexpected retval' 0 ${retval}
41 value=$(getbootparam test)
43 assertEquals 'unexpected value for bootparam test' 'dingens' ${value}
44 assertEquals 'unexpected retval' 0 ${retval}
46 value=$(getbootparam tester)
48 assertTrue 'expected empty string' "[ -z ${value} ]"
49 assertEquals 'unexpected retval' 1 ${retval}