summaryrefslogtreecommitdiffstats
path: root/tests/getopts9.sub
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--tests/getopts9.sub16
1 files changed, 16 insertions, 0 deletions
diff --git a/tests/getopts9.sub b/tests/getopts9.sub
new file mode 100644
index 0000000..fafb067
--- /dev/null
+++ b/tests/getopts9.sub
@@ -0,0 +1,16 @@
+f()
+{
+ OPTIND=4
+
+ echo \$1 = $1
+}
+
+main()
+{
+while getopts abcdefg opt
+do
+ f $opt
+done
+}
+
+main -abc