aboutsummaryrefslogtreecommitdiff
path: root/tests/init.testscript
diff options
context:
space:
mode:
authorKaren Arutyunov <karen@codesynthesis.com>2024-06-27 18:09:36 +0300
committerKaren Arutyunov <karen@codesynthesis.com>2024-06-27 18:09:36 +0300
commit10dee0974d2bc0c9e41f293273e94fb8c7727620 (patch)
treeffb1893f169f302efa413f6f3dc67a588d8a69dd /tests/init.testscript
parent9267b7d75d7c7a875c4c559ce0d1177502425967 (diff)
Add regression test for GH issue #397
Diffstat (limited to 'tests/init.testscript')
-rw-r--r--tests/init.testscript59
1 files changed, 59 insertions, 0 deletions
diff --git a/tests/init.testscript b/tests/init.testscript
index 6714ea0..e41cb48 100644
--- a/tests/init.testscript
+++ b/tests/init.testscript
@@ -546,4 +546,63 @@ status += -d prj
drop libprj
EOE
}
+
+ : orphan-dependency-dependent
+ :
+ : Regression test for GH issue #397.
+ :
+ {
+ $clone_prj;
+
+ cat <<EOI >+prj/repositories.manifest;
+ :
+ role: prerequisite
+ location: ../libprj.git#master
+ EOI
+
+ $new -t empty -o libprj.git libprj &libprj.git/*** 2>!;
+ $new -t lib libprj --package -d libprj.git/ 2>!;
+ $new -t lib libprj-extra --package -d libprj.git/ 2>!;
+
+ cat <<EOI >+libprj.git/libprj/manifest;
+ depends: libprj-extra
+ EOI
+
+ $g config user.name 'Test Script';
+ $g config user.email 'testscript@example.com';
+ $g add '*';
+ $g commit -m 'Create' --no-verify;
+
+ git clone libprj.git &libprj/*** >! 2>!;
+
+ $init -C cfg @cfg -d libprj -- cc &cfg/*** 2>!;
+ $init -A cfg @cfg -d prj 2>!;
+
+ touch libprj/TODO;
+ $sync -d libprj 2>!;
+
+ $deinit -d libprj 2>>~%EOE%;
+ %deinitializing in project .+libprj.%
+ deinitializing package libprj
+ deinitializing package libprj-extra
+ deinitializing in replacement mode due to existing dependents
+ %fetching dir:.+libprj%
+ %fetching dir:.+prj%
+ %fetching git:.+libprj#master \(prerequisite of dir:.+prj\)%
+ %querying .+libprj.git%
+ synchronizing:
+ % replace/downgrade/unhold libprj-extra/0.1.0-.+%
+ % replace/downgrade/unhold libprj/0.1.0-.+%
+ % reconfigure prj/0.1.0-.+%
+ %.*
+ EOE
+
+ $deinit -d prj 2>>/"EOE"
+ deinitializing in project $~/prj/
+ synchronizing:
+ drop prj
+ drop libprj
+ drop libprj-extra
+ EOE
+ }
}