test-lib: simplify '--option=value' parsing