[5703] Fix arg parsing and add test
2 files changed