diff --git a/test/issue2695-nonsensical-dependencies-1.sh b/test/issue2695-nonsensical-dependencies-1.sh new file mode 100755 index 000000000..3de9fc2b6 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-1.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +. $(dirname "${BASH_SOURCE[0]}")/common.sh +cd ${CURR_DIR}/issue2695-nonsensical-dependencies-1 +rm -rf main/~master/main/.dub +rm -rf a/~master/a/.dub +rm -rf b/~master/b/.dub +rm -rf c/0.0.0/c/.dub +rm -rf c/0.0.1/c/.dub +rm -f main/~master/main/dub.selections.json +${DUB} build --bare --compiler=${DC} main + + +if ! grep -c -e \"c\" main/dub.selections.json; then + die $LINENO 'Dependency c not resolved.' +fi diff --git a/test/issue2695-nonsensical-dependencies-1/.no_build b/test/issue2695-nonsensical-dependencies-1/.no_build new file mode 100644 index 000000000..e69de29bb diff --git a/test/issue2695-nonsensical-dependencies-1/a/~master/a/dub.sdl b/test/issue2695-nonsensical-dependencies-1/a/~master/a/dub.sdl new file mode 100644 index 000000000..20300105b --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-1/a/~master/a/dub.sdl @@ -0,0 +1,3 @@ +name "a" +targetType "none" +dependency "c" version="~>0.0.0" diff --git a/test/issue2695-nonsensical-dependencies-1/b/~master/b/dub.sdl b/test/issue2695-nonsensical-dependencies-1/b/~master/b/dub.sdl new file mode 100644 index 000000000..1f6932dc9 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-1/b/~master/b/dub.sdl @@ -0,0 +1,3 @@ +name "b" +targetType "none" +dependency "c" version="0.0.0" diff --git a/test/issue2695-nonsensical-dependencies-1/c/0.0.0/c/dub.sdl b/test/issue2695-nonsensical-dependencies-1/c/0.0.0/c/dub.sdl new file mode 100644 index 000000000..690333632 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-1/c/0.0.0/c/dub.sdl @@ -0,0 +1,3 @@ +name "c" +targetType "none" +version "0.0.0" \ No newline at end of file diff --git a/test/issue2695-nonsensical-dependencies-1/c/0.0.1/c/dub.sdl b/test/issue2695-nonsensical-dependencies-1/c/0.0.1/c/dub.sdl new file mode 100644 index 000000000..c1bd01c79 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-1/c/0.0.1/c/dub.sdl @@ -0,0 +1,3 @@ +name "c" +targetType "none" +version "0.0.1" \ No newline at end of file diff --git a/test/issue2695-nonsensical-dependencies-1/main/~master/main/dub.sdl b/test/issue2695-nonsensical-dependencies-1/main/~master/main/dub.sdl new file mode 100644 index 000000000..acc18f3e9 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-1/main/~master/main/dub.sdl @@ -0,0 +1,3 @@ +name "main" +dependency "a" version="*" +dependency "b" version="*" diff --git a/test/issue2695-nonsensical-dependencies-1/main/~master/main/source/app.d b/test/issue2695-nonsensical-dependencies-1/main/~master/main/source/app.d new file mode 100644 index 000000000..8048619e1 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-1/main/~master/main/source/app.d @@ -0,0 +1,3 @@ +void main(){ + +} \ No newline at end of file diff --git a/test/issue2695-nonsensical-dependencies-2.sh b/test/issue2695-nonsensical-dependencies-2.sh new file mode 100755 index 000000000..90831cdb2 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-2.sh @@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +. $(dirname "${BASH_SOURCE[0]}")/common.sh +cd ${CURR_DIR}/issue2695-nonsensical-dependencies-2 +rm -rf main/~master/main/.dub +rm -rf a/~master/a/.dub +rm -rf b/~master/b/.dub +rm -rf c/0.0.0/c/.dub +rm -rf c/0.0.1/c/.dub +rm -f main/~master/main/dub.selections.json +${DUB} build --bare --compiler=${DC} main + + +if ! grep -c -e \"c\" main/~master/main/dub.selections.json; then + die $LINENO 'Dependency c not resolved.' +fi diff --git a/test/issue2695-nonsensical-dependencies-2/.no_build b/test/issue2695-nonsensical-dependencies-2/.no_build new file mode 100644 index 000000000..e69de29bb diff --git a/test/issue2695-nonsensical-dependencies-2/a/~master/a/dub.sdl b/test/issue2695-nonsensical-dependencies-2/a/~master/a/dub.sdl new file mode 100644 index 000000000..03a1d73e2 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-2/a/~master/a/dub.sdl @@ -0,0 +1,3 @@ +name "a" +targetType "none" +dependency "c" version="0.0.0" diff --git a/test/issue2695-nonsensical-dependencies-2/b/~master/b/dub.sdl b/test/issue2695-nonsensical-dependencies-2/b/~master/b/dub.sdl new file mode 100644 index 000000000..0f8b879b3 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-2/b/~master/b/dub.sdl @@ -0,0 +1,3 @@ +name "b" +targetType "none" +dependency "c" version="~>0.0.0" diff --git a/test/issue2695-nonsensical-dependencies-2/c/0.0.0/c/dub.sdl b/test/issue2695-nonsensical-dependencies-2/c/0.0.0/c/dub.sdl new file mode 100644 index 000000000..690333632 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-2/c/0.0.0/c/dub.sdl @@ -0,0 +1,3 @@ +name "c" +targetType "none" +version "0.0.0" \ No newline at end of file diff --git a/test/issue2695-nonsensical-dependencies-2/c/0.0.1/c/dub.sdl b/test/issue2695-nonsensical-dependencies-2/c/0.0.1/c/dub.sdl new file mode 100644 index 000000000..c1bd01c79 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-2/c/0.0.1/c/dub.sdl @@ -0,0 +1,3 @@ +name "c" +targetType "none" +version "0.0.1" \ No newline at end of file diff --git a/test/issue2695-nonsensical-dependencies-2/main/~master/main/dub.sdl b/test/issue2695-nonsensical-dependencies-2/main/~master/main/dub.sdl new file mode 100644 index 000000000..acc18f3e9 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-2/main/~master/main/dub.sdl @@ -0,0 +1,3 @@ +name "main" +dependency "a" version="*" +dependency "b" version="*" diff --git a/test/issue2695-nonsensical-dependencies-2/main/~master/main/main b/test/issue2695-nonsensical-dependencies-2/main/~master/main/main new file mode 100755 index 000000000..4651210a1 Binary files /dev/null and b/test/issue2695-nonsensical-dependencies-2/main/~master/main/main differ diff --git a/test/issue2695-nonsensical-dependencies-2/main/~master/main/source/app.d b/test/issue2695-nonsensical-dependencies-2/main/~master/main/source/app.d new file mode 100644 index 000000000..8048619e1 --- /dev/null +++ b/test/issue2695-nonsensical-dependencies-2/main/~master/main/source/app.d @@ -0,0 +1,3 @@ +void main(){ + +} \ No newline at end of file