Skip to content

Commit

Permalink
Add test for dlang#2695
Browse files Browse the repository at this point in the history
  • Loading branch information
grillo-delmal committed Aug 18, 2024
1 parent 665173f commit a0de6e7
Show file tree
Hide file tree
Showing 17 changed files with 68 additions and 0 deletions.
16 changes: 16 additions & 0 deletions test/issue2695-nonsensical-dependencies-1.sh
Original file line number Diff line number Diff line change
@@ -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
Empty file.
3 changes: 3 additions & 0 deletions test/issue2695-nonsensical-dependencies-1/a/~master/a/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "a"
targetType "none"
dependency "c" version="~>0.0.0"
3 changes: 3 additions & 0 deletions test/issue2695-nonsensical-dependencies-1/b/~master/b/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "b"
targetType "none"
dependency "c" version="0.0.0"
3 changes: 3 additions & 0 deletions test/issue2695-nonsensical-dependencies-1/c/0.0.0/c/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "c"
targetType "none"
version "0.0.0"
3 changes: 3 additions & 0 deletions test/issue2695-nonsensical-dependencies-1/c/0.0.1/c/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "c"
targetType "none"
version "0.0.1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "main"
dependency "a" version="*"
dependency "b" version="*"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
void main(){

}
16 changes: 16 additions & 0 deletions test/issue2695-nonsensical-dependencies-2.sh
Original file line number Diff line number Diff line change
@@ -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
Empty file.
3 changes: 3 additions & 0 deletions test/issue2695-nonsensical-dependencies-2/a/~master/a/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "a"
targetType "none"
dependency "c" version="0.0.0"
3 changes: 3 additions & 0 deletions test/issue2695-nonsensical-dependencies-2/b/~master/b/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "b"
targetType "none"
dependency "c" version="~>0.0.0"
3 changes: 3 additions & 0 deletions test/issue2695-nonsensical-dependencies-2/c/0.0.0/c/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "c"
targetType "none"
version "0.0.0"
3 changes: 3 additions & 0 deletions test/issue2695-nonsensical-dependencies-2/c/0.0.1/c/dub.sdl
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "c"
targetType "none"
version "0.0.1"
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
name "main"
dependency "a" version="*"
dependency "b" version="*"
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
void main(){

}

0 comments on commit a0de6e7

Please sign in to comment.