diff --git a/test/issue1194-warn-wrong-subconfig.sh b/test/issue1194-warn-wrong-subconfig.sh new file mode 100755 index 0000000..414bfe2 --- /dev/null +++ b/test/issue1194-warn-wrong-subconfig.sh @@ -0,0 +1,14 @@ +#!/usr/bin/env bash +set -e + +OUTPUT=`${DUB} build --root ${CURR_DIR}/issue1194-warn-wrong-subconfig 2>&1 || true` + +# make sure the proper errors occur in the output +echo $OUTPUT | grep -c "sub configuration directive \"bar\" -> \"baz\" references a package that is not specified as a dependency" > /dev/null +echo $OUTPUT | grep -c "sub configuration directive \"staticlib-simple\" -> \"foo\" references a configuration that does not exist" > /dev/null +! echo $OUTPUT | grep -c "sub configuration directive \"sourcelib-simple\" -> \"library\" references a package that is not specified as a dependency" > /dev/null +! echo $OUTPUT | grep -c "sub configuration directive \"sourcelib-simple\" -> \"library\" references a configuration that does not exist" > /dev/null + +# make sure no bogs warnings are issued for packages with no sub configuration directives +OUTPUT=`${DUB} build --root ${CURR_DIR}/1-exec-simple 2>&1` +! echo $OUTPUT | grep -c "sub configuration directive.*references" > /dev/null diff --git a/test/issue1194-warn-wrong-subconfig/.no_build b/test/issue1194-warn-wrong-subconfig/.no_build new file mode 100644 index 0000000..e69de29 --- /dev/null +++ b/test/issue1194-warn-wrong-subconfig/.no_build diff --git a/test/issue1194-warn-wrong-subconfig/dub.sdl b/test/issue1194-warn-wrong-subconfig/dub.sdl new file mode 100644 index 0000000..867864d --- /dev/null +++ b/test/issue1194-warn-wrong-subconfig/dub.sdl @@ -0,0 +1,8 @@ +name "test" +dependency "staticlib-simple" path="../1-staticLib-simple" +dependency "sourcelib-simple" path="../1-sourceLib-simple" +targetType "executable" + +subConfiguration "staticlib-simple" "foo" +subConfiguration "bar" "baz" +subConfiguration "sourcelib-simple" "library" diff --git a/test/issue1194-warn-wrong-subconfig/source/app.d b/test/issue1194-warn-wrong-subconfig/source/app.d new file mode 100644 index 0000000..ab73b3a --- /dev/null +++ b/test/issue1194-warn-wrong-subconfig/source/app.d @@ -0,0 +1 @@ +void main() {}