[PATCH v2 07/13] unit tests: add tests for prepare_cmdline