[PATCH v3 19/23] test: Add a test for getopt