]>
Commit | Line | Data |
---|---|---|
deb63bfb | 1 | # $FreeBSD: head/bin/sh/tests/builtins/getopts4.0 265616 2014-05-07 21:45:25Z jilles $ |
71aad674 A |
2 | |
3 | set -- -x | |
4 | opt=not | |
5 | getopts x opt | |
6 | r1=$? OPTIND1=$OPTIND opt1=$opt | |
7 | getopts x opt | |
8 | r2=$? OPTIND2=$OPTIND | |
9 | [ "$r1" = 0 ] && [ "$OPTIND1" = 2 ] && [ "$opt1" = x ] && [ "$r2" != 0 ] && | |
10 | [ "$OPTIND2" = 2 ] |