diff options
author | Sami Kerola | 2014-12-05 23:49:48 +0100 |
---|---|---|
committer | Sami Kerola | 2014-12-08 21:07:00 +0100 |
commit | d458000dea7ff96c63532b317fce631847768877 (patch) | |
tree | fba6ba1a4604946593bf23d07ba4bab4f811003f /tests/expected/misc | |
parent | tests: copy test-suite from Frodo Looijaard's getopt (diff) | |
download | kernel-qcow2-util-linux-d458000dea7ff96c63532b317fce631847768877.tar.gz kernel-qcow2-util-linux-d458000dea7ff96c63532b317fce631847768877.tar.xz kernel-qcow2-util-linux-d458000dea7ff96c63532b317fce631847768877.zip |
tests: add more getopt tests
After importing Frodo's tests I ran coverage to see if something had
remained unchecked, and there were couple tests that could be done.
CC: Frodo Looijaard <frodo@frodo.looijaard.name>
Signed-off-by: Sami Kerola <kerolasa@iki.fi>
Diffstat (limited to 'tests/expected/misc')
-rw-r--r-- | tests/expected/misc/getopt3 | 0 | ||||
-rw-r--r-- | tests/expected/misc/getopt3-compatible | 5 | ||||
-rw-r--r-- | tests/expected/misc/getopt3-csh | 2 | ||||
-rw-r--r-- | tests/expected/misc/getopt3-no-arguments | 3 | ||||
-rw-r--r-- | tests/expected/misc/getopt3-non-option | 4 | ||||
-rw-r--r-- | tests/expected/misc/getopt3-posix_correctly | 4 | ||||
-rw-r--r-- | tests/expected/misc/getopt3-sh | 2 |
7 files changed, 20 insertions, 0 deletions
diff --git a/tests/expected/misc/getopt3 b/tests/expected/misc/getopt3 new file mode 100644 index 000000000..e69de29bb --- /dev/null +++ b/tests/expected/misc/getopt3 diff --git a/tests/expected/misc/getopt3-compatible b/tests/expected/misc/getopt3-compatible new file mode 100644 index 000000000..585de608a --- /dev/null +++ b/tests/expected/misc/getopt3-compatible @@ -0,0 +1,5 @@ +getopt: missing optstring argument +Try `getopt --help' for more information. +exit value: 2 + -- +exit value: 0 diff --git a/tests/expected/misc/getopt3-csh b/tests/expected/misc/getopt3-csh new file mode 100644 index 000000000..86e48f4fe --- /dev/null +++ b/tests/expected/misc/getopt3-csh @@ -0,0 +1,2 @@ + -a -b '1' -c '2' --a-long --b-long '3' --c-long '' -- 'foo' 'bar' +exit value: 0 diff --git a/tests/expected/misc/getopt3-no-arguments b/tests/expected/misc/getopt3-no-arguments new file mode 100644 index 000000000..08b3ed5cf --- /dev/null +++ b/tests/expected/misc/getopt3-no-arguments @@ -0,0 +1,3 @@ +getopt: missing optstring argument +Try `getopt --help' for more information. +exit value: 2 diff --git a/tests/expected/misc/getopt3-non-option b/tests/expected/misc/getopt3-non-option new file mode 100644 index 000000000..73f0b659c --- /dev/null +++ b/tests/expected/misc/getopt3-non-option @@ -0,0 +1,4 @@ + -a 'x' -- 'y' '-b' 'z' 'w' + -a 'x' -b 'z' -- 'y' 'w' + -a 'x' 'y' -b 'z' 'w' -- +exit value: 0 diff --git a/tests/expected/misc/getopt3-posix_correctly b/tests/expected/misc/getopt3-posix_correctly new file mode 100644 index 000000000..5b2bc33fc --- /dev/null +++ b/tests/expected/misc/getopt3-posix_correctly @@ -0,0 +1,4 @@ + -a -b '1' -c '2' --a-long --b-long '3' --c-long '' -- 'foo' 'bar' 'xyxxy' '--a-long' +exit value: 0 + -a -b '1' -c '2' --a-long --b-long '3' --c-long '' -- 'foo' 'bar' 'xyxxy' '--a-long' +exit value: 0 diff --git a/tests/expected/misc/getopt3-sh b/tests/expected/misc/getopt3-sh new file mode 100644 index 000000000..86e48f4fe --- /dev/null +++ b/tests/expected/misc/getopt3-sh @@ -0,0 +1,2 @@ + -a -b '1' -c '2' --a-long --b-long '3' --c-long '' -- 'foo' 'bar' +exit value: 0 |