diff --git a/test/.gitignore b/test/.gitignore index adf9c15..f58740b 100644 --- a/test/.gitignore +++ b/test/.gitignore @@ -11,3 +11,4 @@ custom-unittest/custom-unittest path-subpackage-ref/test subpackage-ref/test +subpackage-common-with-sourcefile-globbing/mypackage* diff --git a/test/subpackage-common-with-sourcefile-globbing.sh b/test/subpackage-common-with-sourcefile-globbing.sh new file mode 100755 index 0000000..1341acc --- /dev/null +++ b/test/subpackage-common-with-sourcefile-globbing.sh @@ -0,0 +1,8 @@ +#!/bin/sh +set -e + +cd ${CURR_DIR}/subpackage-common-with-sourcefile-globbing +rm -rf .dub dub.selections.json +${DUB} build --compiler=${DC} :server -v +${DUB} build --compiler=${DC} :client -v +${DUB} build --compiler=${DC} :common -v diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/app.d b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/app.d new file mode 100644 index 0000000..b44941f --- /dev/null +++ b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/app.d @@ -0,0 +1,3 @@ +import mypackage.client.extra; +import mypackage.common.blah; +void main() { foo(); blah(); } diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/extra.d b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/extra.d new file mode 100644 index 0000000..16ada9b --- /dev/null +++ b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/client/extra.d @@ -0,0 +1,2 @@ +module mypackage.client.extra; +void foo() {} diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/common/blah.d b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/common/blah.d new file mode 100644 index 0000000..7b4b17f --- /dev/null +++ b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/common/blah.d @@ -0,0 +1,2 @@ +module mypackage.common.blah; +void blah() {} diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/app.d b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/app.d new file mode 100644 index 0000000..8912405 --- /dev/null +++ b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/app.d @@ -0,0 +1,3 @@ +import mypackage.server.extra; +import mypackage.common.blah; +void main() { foo(); blah(); } diff --git a/test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/extra.d b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/extra.d new file mode 100644 index 0000000..07cc3ef --- /dev/null +++ b/test/subpackage-common-with-sourcefile-globbing/code/mypackage/server/extra.d @@ -0,0 +1,2 @@ +module mypackage.server.extra; +void foo() {} diff --git a/test/subpackage-common-with-sourcefile-globbing/dub.sdl b/test/subpackage-common-with-sourcefile-globbing/dub.sdl new file mode 100644 index 0000000..a659505 --- /dev/null +++ b/test/subpackage-common-with-sourcefile-globbing/dub.sdl @@ -0,0 +1,19 @@ +name "mypackage" +targetType "none" +subPackage { + name "server" + sourceFiles "code/mypackage/[sc][oe]*/*.d" + targetType "executable" +} +subPackage { + name "client" + sourceFiles "code/mypackage/client/*.d" + targetType "executable" + dependency "mypackage:common" version="*" +} +subPackage { + name "common" + sourceFiles "code/mypackage/common/*.d" + importPaths "code" + targetType "library" +}