diff --git a/test/custom-unittest/dub.json b/test/custom-unittest/dub.json new file mode 100644 index 0000000..57660e3 --- /dev/null +++ b/test/custom-unittest/dub.json @@ -0,0 +1,21 @@ +{ + "name": "custom-unittest", + "configurations": [ + { + "name": "application", + "targetType": "executable" + }, + { + "name": "library", + "excludedSourceFiles": ["source/app.d"], + "targetType": "library" + }, + { + "name": "unittest", + "targetType": "executable", + "excludedSourceFiles": ["source/app.d"], + "sourcePaths": ["test/"], + "importPaths": ["test/"] + } + ] +} diff --git a/test/custom-unittest/source/app.d b/test/custom-unittest/source/app.d new file mode 100644 index 0000000..ac8c8cd --- /dev/null +++ b/test/custom-unittest/source/app.d @@ -0,0 +1,9 @@ +module app; +import lib; +import std.stdio; + +void main() +{ + writeln("Running application."); + libFunc(); +} diff --git a/test/custom-unittest/source/lib.d b/test/custom-unittest/source/lib.d new file mode 100644 index 0000000..e489a1c --- /dev/null +++ b/test/custom-unittest/source/lib.d @@ -0,0 +1,7 @@ +module lib; + +void libFunc() +{ + import std.stdio; + writefln("Library function called."); +} \ No newline at end of file diff --git a/test/custom-unittest/test/main.d b/test/custom-unittest/test/main.d new file mode 100644 index 0000000..6697dae --- /dev/null +++ b/test/custom-unittest/test/main.d @@ -0,0 +1,7 @@ +module main; + +void main() +{ + import std.stdio; + writefln("Running unit tests."); +} \ No newline at end of file diff --git a/test/path-subpackage-ref/dub.json b/test/path-subpackage-ref/dub.json new file mode 100644 index 0000000..f82433d --- /dev/null +++ b/test/path-subpackage-ref/dub.json @@ -0,0 +1,9 @@ +{ + "name": "test", + "dependencies": { + "test:subpack": "~master" + }, + "subPackages": [ + "subpack/" + ] +} \ No newline at end of file diff --git a/test/path-subpackage-ref/source/app.d b/test/path-subpackage-ref/source/app.d new file mode 100644 index 0000000..c3eec7f --- /dev/null +++ b/test/path-subpackage-ref/source/app.d @@ -0,0 +1,6 @@ +import std.stdio; + +void main() +{ + writeln("Edit source/app.d to start your project."); +} diff --git a/test/path-subpackage-ref/subpack/dub.json b/test/path-subpackage-ref/subpack/dub.json new file mode 100644 index 0000000..6c11e39 --- /dev/null +++ b/test/path-subpackage-ref/subpack/dub.json @@ -0,0 +1,8 @@ +{ + "name": "subpack", + "description": "A minimal D application.", + "copyright": "Copyright © 2014, sludwig", + "authors": ["sludwig"], + "dependencies": { + } +} diff --git a/test/path-subpackage-ref/subpack/source/app.d b/test/path-subpackage-ref/subpack/source/app.d new file mode 100644 index 0000000..c3eec7f --- /dev/null +++ b/test/path-subpackage-ref/subpack/source/app.d @@ -0,0 +1,6 @@ +import std.stdio; + +void main() +{ + writeln("Edit source/app.d to start your project."); +} diff --git a/test/subpackage-ref/dub.json b/test/subpackage-ref/dub.json new file mode 100644 index 0000000..73148a5 --- /dev/null +++ b/test/subpackage-ref/dub.json @@ -0,0 +1,11 @@ +{ + "name": "test", + "dependencies": { + "test:subpack": "~master" + }, + "subPackages": [ + { + "name": "subpack" + } + ] +} \ No newline at end of file diff --git a/test/subpackage-ref/source/app.d b/test/subpackage-ref/source/app.d new file mode 100644 index 0000000..c3eec7f --- /dev/null +++ b/test/subpackage-ref/source/app.d @@ -0,0 +1,6 @@ +import std.stdio; + +void main() +{ + writeln("Edit source/app.d to start your project."); +}