summaryrefslogtreecommitdiff
path: root/shell/ash_test/ash-getopts/getopt_simple.right
diff options
context:
space:
mode:
Diffstat (limited to 'shell/ash_test/ash-getopts/getopt_simple.right')
-rw-r--r--shell/ash_test/ash-getopts/getopt_simple.right34
1 files changed, 34 insertions, 0 deletions
diff --git a/shell/ash_test/ash-getopts/getopt_simple.right b/shell/ash_test/ash-getopts/getopt_simple.right
new file mode 100644
index 0000000..07e3c57
--- /dev/null
+++ b/shell/ash_test/ash-getopts/getopt_simple.right
@@ -0,0 +1,34 @@
+*** no OPTIND, optstring:'ab' args:-a -b c
+var:'a' OPTIND:2
+var:'b' OPTIND:3
+exited: rc:0 var:'?' OPTIND:3
+*** OPTIND=1, optstring:'ab' args:-a -b c
+var:'a' OPTIND:2
+var:'b' OPTIND:3
+exited: rc:0 var:'?' OPTIND:3
+*** OPTIND=0, optstring:'ab' args:-a -b c
+var:'a' OPTIND:2
+var:'b' OPTIND:3
+exited: rc:0 var:'?' OPTIND:3
+*** unset OPTIND, optstring:'ab' args:-a -b c
+var:'a' OPTIND:2
+var:'b' OPTIND:3
+exited: rc:0 var:'?' OPTIND:3
+*** optstring:'ab' args:-a -b c
+1 rc:0 var:'a' OPTIND:2
+2 rc:0 var:'b' OPTIND:3
+3 rc:1 var:'?' OPTIND:3
+*** unset OPTIND, optstring:'ab' args:-a c -c -b d
+var:'a' OPTIND:2
+exited: rc:0 var:'?' OPTIND:2
+*** unset OPTIND, optstring:'ab' args:-a -c -b d
+var:'a' OPTIND:2
+Illegal option -c
+var:'?' OPTIND:3
+var:'b' OPTIND:4
+exited: rc:0 var:'?' OPTIND:4
+*** unset OPTIND, OPTERR=0, optstring:'ab' args:-a -c -b d
+var:'a' OPTIND:2
+var:'?' OPTIND:3
+var:'b' OPTIND:4
+exited: rc:0 var:'?' OPTIND:4