Handling double-hyphens

This commit is contained in:
Tyler Akins
2016-07-21 09:45:31 -05:00
parent b69406835f
commit ea76dc468b
5 changed files with 53 additions and 27 deletions

View File

@@ -0,0 +1 @@
cat: --help: No such file or directory

5
tests/double-hyphen.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# This should display a message indicating that the file --help
# could not be found. It should not display a help messsage.
cd "${0%/*}"
../mo -- --help 2>&1

View File

@@ -0,0 +1 @@
cat: --something: No such file or directory

5
tests/invalid-option.sh Executable file
View File

@@ -0,0 +1,5 @@
#!/usr/bin/env bash
# This should display a message indicating that the file --something
# could not be found.
cd "${0%/*}"
../mo --something 2>&1