From 74d40589288890fffea437ed2f38ad1f2dc740e5 Mon Sep 17 00:00:00 2001 From: Denys Vlasenko Date: Fri, 11 Aug 2017 01:32:46 +0200 Subject: hush: getopts builtin function old new delta builtin_getopts - 271 +271 bltins1 372 384 +12 ------------------------------------------------------------------------------ (add/remove: 1/0 grow/shrink: 1/0 up/down: 283/0) Total: 283 bytes Signed-off-by: Denys Vlasenko --- shell/hush_test/hush-getopts/getopt_simple.right | 34 ++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 shell/hush_test/hush-getopts/getopt_simple.right (limited to 'shell/hush_test/hush-getopts/getopt_simple.right') diff --git a/shell/hush_test/hush-getopts/getopt_simple.right b/shell/hush_test/hush-getopts/getopt_simple.right new file mode 100644 index 000000000..b4855fa1a --- /dev/null +++ b/shell/hush_test/hush-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 +./getopt_simple.tests: invalid 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 -- cgit v1.2.3