option handling improvement

Signed-off-by: Hiroshi Miura <miurahr@linux.com>
update test cases

Signed-off-by: Hiroshi Miura <miurahr@linux.com>