From 9a3a62c572528a50a25f6bb69e9d22f60776d66c Mon Sep 17 00:00:00 2001 From: Grillo del Mal Date: Sat, 17 Aug 2024 23:31:25 -0400 Subject: [PATCH] Add test for #2695 --- test/issue2695-nonsensical-dependencies-1.sh | 16 ++++++++++++++++ .../.no_build | 0 .../a/~master/a/dub.sdl | 3 +++ .../b/~master/b/dub.sdl | 3 +++ .../c/0.0.0/c/dub.sdl | 3 +++ .../c/0.0.1/c/dub.sdl | 3 +++ .../main/~master/main/dub.sdl | 3 +++ .../main/~master/main/source/app.d | 3 +++ test/issue2695-nonsensical-dependencies-2.sh | 16 ++++++++++++++++ .../.no_build | 0 .../a/~master/a/dub.sdl | 3 +++ .../b/~master/b/dub.sdl | 3 +++ .../c/0.0.0/c/dub.sdl | 3 +++ .../c/0.0.1/c/dub.sdl | 3 +++ .../main/~master/main/dub.sdl | 3 +++ .../main/~master/main/main | Bin 0 -> 18440 bytes .../main/~master/main/source/app.d | 3 +++ 17 files changed, 68 insertions(+) create mode 100755 test/issue2695-nonsensical-dependencies-1.sh create mode 100644 test/issue2695-nonsensical-dependencies-1/.no_build create mode 100644 test/issue2695-nonsensical-dependencies-1/a/~master/a/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-1/b/~master/b/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-1/c/0.0.0/c/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-1/c/0.0.1/c/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-1/main/~master/main/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-1/main/~master/main/source/app.d create mode 100755 test/issue2695-nonsensical-dependencies-2.sh create mode 100644 test/issue2695-nonsensical-dependencies-2/.no_build create mode 100644 test/issue2695-nonsensical-dependencies-2/a/~master/a/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-2/b/~master/b/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-2/c/0.0.0/c/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-2/c/0.0.1/c/dub.sdl create mode 100644 test/issue2695-nonsensical-dependencies-2/main/~master/main/dub.sdl create mode 100755 test/issue2695-nonsensical-dependencies-2/main/~master/main/main create mode 100644 test/issue2695-nonsensical-dependencies-2/main/~master/main/source/app.d diff --git a/test/issue2695-nonsensical-dependencies-1.sh b/test/issue2695-nonsensical-dependencies-1.sh new file mode 100755 index 000000000..526d65add --- /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/~master/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 0000000000000000000000000000000000000000..4651210a1a427cce1e4052e285d3d3081d2bc52f GIT binary patch literal 18440 zcmeHPeQX>@6`wtS#I761j%jck+H4_dlL+tK*^cA7Bss^9a|Wk%<1|e{WqZC`+lS6~ z*So#chSCNKrJ*fN0nrL5Dj=xDM}?pgm5{(~DoTMrQVBu+04bs%B?3w+K7RNS;YKEi{S3+xunv&3y5u*^=!gdXygzKh)ripXtTQsMXP-!7i!qrlOi-z9bWLTl9 z!|;UDD&`gUPv{x0KxjQq*Jm3)%1)R9)3-2AXg!W%^GuI1e`bfl2`zG5o?t3CVhMMW zaVHrkREa%Pi6^y@u0f9HU_$~N@rK&OAlW)sDu_G8xI=6&bd>FdQXQ10e(Puco%$vj zS8a%$(EcQ@Qjbun?Y|L#Ww$=OMYbeMDpI}TaN4IEpPiV#LJt0ihRw61WLruk?zc? zWu#5d5l>6uGbg~3zxW@3HW7cnE!dkS+n6I z+CSMJud&CTv9XX&?x5W7dWKA>Nv%I1!Sbn@W5;J|#?+qgYx@tqqRG*-$!A~Lm3;PZ z4N2>V$(LUDJF6a6v4OZpMN;FDUx^7M${q5=ZqZdDHYJ?DF#cpp&4tgB}6(K@+bo zFMo^VpeINUdKUBqXd}M_qj#N@toQF%)3R(Xk=mPYcL6zv!Mo)Er0~g_kNsmObC0x%#b}49>!U%*B2qO?iAdEm5fiMDL z1i}b}5eOsjzZ8KOUMEsI!c;Lm!IZaU_?p`!;olSB7Xv(fD@m!k5905nR~xbVCHude zdHJ4sJ@d4eqI88J>PP(jvV6xa`oFxsTp*Jt8WP%4_JMo=rGC6_)%`ie?Z-=G z%}d;|wbc9x)-(LSMylVB2WlMP`#Z+85krbhQpKXS?7(|>N_$5}hV0GwN_mSN?|0%( z-0qF__Q$rz;`ZkKUdB$Qd{*>q-x9Fy73;x(H55JZEef9i+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Y<&+oa{nRw5Uovz~O8Sp@Q8{`&k3aHG zu~aB}C4aF_G+oK!IA=D)qT$`+Jv2@oGM`J8=aiFK%%ciJ{gTn}#^fBvg$@x-5r9j@ zoUa@jZ_4q#1?2j^INlr&$hizK!Wm05GL5B_;V?CyO{2B~d?0hQV>5zym^lcna_~c$ z$M{zcZ+~>xA*bHxo;oStFJ-4ISU#Xf-gITwEmo%CzQ*ej&brj}bjdp`mN@k4Nf|Mg zA{_XO#hQasDnASEKalA80j4^$?gH&@NFcAB50~c$T8NBn>(kr7(4HOBlTL$-m-Emz z%Z12%Cj0;j_4q@Kmvhk@#gM64&ew$F0lchN?&1d#cFk0mg7{k?{VSdkNc*4Q`k!FD z^uL+?1lym2oSumYeu?o*j9*|J_0hs5_->YGLCI9`@*HN68%mps`b0kJ(;Z;wnTO!z zImZdc%kvv)zt{=A8+dw#BD_3DImLLJD+{)t#d>*4rh=E}Hs;WO?YWKAAMF35z!H8p zJCx@@FRy=YD21du>IeGhVa$++X-W98!~E0H4oyS zg{B^#WPH*#ke^kNrXcYb@lQ~o9V8F;>Uvww{RjIic%i=lc1;~#o?HH?2STKOg?||~ zbnm5pSue}~;~;^d@k>eS6~DiSjQU^2?@EBf`E=}VDT$roYIyPUDirm2S%05q{AK|% z6`au50(e>HcEk)o)}7);aKcmNrhZ$CWM5!2K4^a)4=~B3|FVAF%y=f%>Vo*yTz}9` z@P#VU6sWC~gsww@>JH)`Wxw(q(C-edez{{nx@1@K+{21xtc`V_3+y8!+ZjDNl!jB*fv2jheB z-%k(Ske)WAnhRd&U5u|9aG{z0up`jo-y9yb<^7pqDG8y|QR#S4w6w?9c!TM>MUJ3v8cNqL<1AqXl{t4xasi6P> literal 0 HcmV?d00001 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