test: Add a test for getopt
authorSean Anderson <seanga2@gmail.com>
Tue, 27 Oct 2020 23:55:37 +0000 (19:55 -0400)
committerTom Rini <trini@konsulko.com>
Fri, 30 Oct 2020 14:56:11 +0000 (10:56 -0400)
commitfbc33df13cd44f4fac63faf1250bd5849d447997
treef5cc3d16bcbeb3d1632f14d81198ffc261557407
parent72eda5074b92d54ff67979f7a45ced9a119c4a8c
test: Add a test for getopt

A few of these tests were inspired by those in glibc. The syntax for
invoking test_getopt is a bit funky, but it's necessary so that the CPP can
parse the arguments correctly.

Signed-off-by: Sean Anderson <seanga2@gmail.com>
test/lib/Makefile
test/lib/getopt.c [new file with mode: 0644]