2017-02-16 23:55:16 +00:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
set -e
|
|
|
|
die() { echo "$@" 1>&2 ; exit 1; }
|
|
|
|
|
2020-08-20 15:41:23 +00:00
|
|
|
( dub --single args.d | grep -q '^argtest=$' ) || die "Fail (no argument): '`dub --single args.d`'"
|
|
|
|
( dub --single args.d -- --argtest=aoeu | grep -q '^argtest=aoeu$' ) || die "Fail (with argument): '`dub --single args.d -- --argtest=aoeu`'"
|
|
|
|
( ( ! dub --single args.d -- --inexisting 2>&1 ) | grep -qF 'Unrecognized command line option' ) || die "Fail (unknown argument): '`dub --single args.d -- --inexisting 2>&1`'"
|
2017-02-16 23:55:16 +00:00
|
|
|
|
|
|
|
echo 'OK'
|