Created
October 9, 2014 19:50
-
-
Save akaptur/fd24335d81328bbd8de8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
test ⚲ ./testopt | |
aflag = 0, bflag = 0, cvalue = (null) | |
test ⚲ ./testopt -a -b | |
aflag = 1, bflag = 1, cvalue = (null) | |
test ⚲ ./testopt -c | |
Option -c requires an argument. | |
test ⚲ ./testopt -ab | |
aflag = 1, bflag = 1, cvalue = (null) | |
test ⚲ ./testopt -c foo | |
aflag = 0, bflag = 0, cvalue = foo | |
test ⚲ ./testopt -cfoo | |
aflag = 0, bflag = 0, cvalue = foo | |
test ⚲ ./testopt arg1 | |
aflag = 0, bflag = 0, cvalue = (null) | |
Non-option argument arg1 | |
test ⚲ ./testopt -a arg1 | |
aflag = 1, bflag = 0, cvalue = (null) | |
Non-option argument arg1 | |
test ⚲ ./testopt -c foo arg1 | |
aflag = 0, bflag = 0, cvalue = foo | |
Non-option argument arg1 | |
test ⚲ ./testopt -a -- -b | |
aflag = 1, bflag = 0, cvalue = (null) | |
Non-option argument -b | |
test ⚲ ./testopt -a - | |
aflag = 1, bflag = 0, cvalue = (null) | |
Non-option argument - |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment