1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49
|
Set up cram alias and example tests:
$ . "$TESTDIR"/setup.sh
Options in .cramrc:
$ cat > .cramrc <<EOF
> [cram]
> yes = True
> no = 1
> indent = 4
> EOF
$ cram
options --yes and --no are mutually exclusive
[2]
$ mv .cramrc config
$ CRAMRC=config cram
options --yes and --no are mutually exclusive
[2]
$ rm config
Invalid option in .cramrc:
$ cat > .cramrc <<EOF
> [cram]
> indent = hmm
> EOF
$ cram
[Uu]sage: cram \[OPTIONS\] TESTS\.\.\. (re)
cram: error: option --indent: invalid integer value: 'hmm'
[2]
$ rm .cramrc
$ cat > .cramrc <<EOF
> [cram]
> verbose = hmm
> EOF
$ cram
[Uu]sage: cram \[OPTIONS\] TESTS\.\.\. (re)
cram: error: --verbose: invalid boolean value: 'hmm'
[2]
$ rm .cramrc
Options in an environment variable:
$ CRAM='-y -n' cram
options --yes and --no are mutually exclusive
[2]
|