[PATCH v2 18/22] test: Add a test for getopt