aboutsummaryrefslogtreecommitdiff
path: root/tests/common
diff options
context:
space:
mode:
Diffstat (limited to 'tests/common')
-rwxr-xr-xtests/common/git/init96
-rwxr-xr-xtests/common/git/pack1
-rw-r--r--tests/common/git/state0/libbar.tarbin81920 -> 81920 bytes
-rw-r--r--tests/common/git/state0/libfoo.tarbin327680 -> 327680 bytes
-rw-r--r--tests/common/git/state0/libfox.tarbin143360 -> 143360 bytes
-rw-r--r--tests/common/git/state0/links.tarbin0 -> 276480 bytes
-rw-r--r--tests/common/git/state0/style-basic.tarbin71680 -> 71680 bytes
-rw-r--r--tests/common/git/state0/style.tarbin143360 -> 143360 bytes
-rw-r--r--tests/common/git/state1/libbaz.tarbin61440 -> 61440 bytes
-rw-r--r--tests/common/git/state1/libfoo.tarbin409600 -> 409600 bytes
-rw-r--r--tests/common/git/state1/libfox.tarbin143360 -> 143360 bytes
-rw-r--r--tests/common/git/state1/style-basic.tarbin71680 -> 71680 bytes
-rw-r--r--tests/common/git/state1/style.tarbin143360 -> 143360 bytes
13 files changed, 97 insertions, 0 deletions
diff --git a/tests/common/git/init b/tests/common/git/init
index 4fac21e..5153175 100755
--- a/tests/common/git/init
+++ b/tests/common/git/init
@@ -42,6 +42,18 @@ fi
#
cd state0
+rm -f -r links.git/.git
+rm -f links.git/.gitmodules
+rm -f links.git/bl
+rm -f links.git/lc
+rm -f links.git/pg
+rm -f links.git/bs
+rm -f links.git/bf
+rm -f links.git/tl
+rm -f links.git/td
+rm -f links.git/ts
+rm -f -r links.git/doc/style
+
rm -f -r libfoo.git/.git
rm -f libfoo.git/.gitmodules
rm -f libfoo.git/README
@@ -156,6 +168,86 @@ git -C libfox.git submodule add ../libbar.git libbar
git -C libfox.git submodule update --init --recursive # Recursive for safety.
git -C libfox.git commit -am 'Create'
+# Create master branch for links.git, adding style.git as a submodule.
+#
+git -C links.git init
+
+cat <<EOF >links.git/manifest
+: 1
+name: links
+version: 0.0.1
+summary: links
+license: MIT
+url: http://example.org
+email: pkg@example.org
+EOF
+
+git -C links.git add '*'
+git -C links.git submodule add ../style.git doc/style
+git -C links.git submodule update --init --recursive # Updates doc/style/basic.
+git -C links.git commit -am 'Create'
+git -C links.git tag -a 'v0.0.1' -m 'Tag version 0.0.1'
+
+# Increase links version and add symlinks.
+#
+cat <<EOF >links.git/manifest
+: 1
+name: links
+version: 1.0.0-a.0.z
+summary: links
+license: MIT
+url: http://example.org
+email: pkg@example.org
+EOF
+
+ln -s tests links.git/ts # Directory symlink.
+ln -s ts/TODO links.git/td # File symlink via directory symlink.
+ln -s td links.git/tl # Symlink symlink.
+ln -s doc/style/buildfile links.git/bf # Submodule file symlink.
+ln -s doc/style/basic links.git/bs # Submodule directory symlink.
+ln -s bs/page.css links.git/pg # Symlink via submodule directory symlink.
+
+git -C links.git add '*'
+git -C links.git commit -am 'Add symlinks'
+git -C links.git tag -a 'v1.0.0-alpha' -m 'Tag version 1.0.0-alpha'
+
+# Increase links version and add dangling symlink.
+#
+cat <<EOF >links.git/manifest
+: 1
+name: links
+version: 1.0.1
+summary: links
+license: MIT
+url: http://example.org
+email: pkg@example.org
+EOF
+
+ln -s lc links.git/bl # Dangling symlink.
+
+git -C links.git add '*'
+git -C links.git commit -am 'Add dangling symlinks'
+git -C links.git tag -a 'v1.0.1' -m 'Tag version 1.0.1'
+
+# Increase links version and add cyclic symlink.
+#
+cat <<EOF >links.git/manifest
+: 1
+name: links
+version: 1.0.2
+summary: links
+license: MIT
+url: http://example.org
+email: pkg@example.org
+EOF
+
+ln -s bl links.git/lc # Cyclic symlink.
+
+git -C links.git add '*'
+git -C links.git commit -am 'Add cyclic symlinks'
+git -C links.git tag -a 'v1.0.2' -m 'Tag version 1.0.2'
+
+
# Create the modified state of the repositories, replacing libbar.git submodule
# of libfoo with the newly created libbaz.git repository. Also advance master
# branches and tags for libfoo.git and it's submodule style.git.
@@ -169,6 +261,10 @@ for d in ../state0/*.git; do
cp -r $d .
done
+# Drop the links.git repository.
+#
+rm -f -r links.git/
+
# Create libbaz.git repository.
#
rm -f -r libbaz.git/.git
diff --git a/tests/common/git/pack b/tests/common/git/pack
index f9d9772..fd0b49c 100755
--- a/tests/common/git/pack
+++ b/tests/common/git/pack
@@ -15,6 +15,7 @@ function error () { info "$*"; exit 1; }
projects=(\
state0/libfoo state0/libfox state0/libbar state0/style state0/style-basic \
+ state0/links \
state1/libfoo state1/libfox state1/libbaz state1/style state1/style-basic)
for p in "${projects[@]}"; do
diff --git a/tests/common/git/state0/libbar.tar b/tests/common/git/state0/libbar.tar
index 2e1a3ad..027112c 100644
--- a/tests/common/git/state0/libbar.tar
+++ b/tests/common/git/state0/libbar.tar
Binary files differ
diff --git a/tests/common/git/state0/libfoo.tar b/tests/common/git/state0/libfoo.tar
index 6a0cc8a..96a9f5b 100644
--- a/tests/common/git/state0/libfoo.tar
+++ b/tests/common/git/state0/libfoo.tar
Binary files differ
diff --git a/tests/common/git/state0/libfox.tar b/tests/common/git/state0/libfox.tar
index a73f460..fc2c391 100644
--- a/tests/common/git/state0/libfox.tar
+++ b/tests/common/git/state0/libfox.tar
Binary files differ
diff --git a/tests/common/git/state0/links.tar b/tests/common/git/state0/links.tar
new file mode 100644
index 0000000..33c5dbf
--- /dev/null
+++ b/tests/common/git/state0/links.tar
Binary files differ
diff --git a/tests/common/git/state0/style-basic.tar b/tests/common/git/state0/style-basic.tar
index 36d0dcd..8b57bd0 100644
--- a/tests/common/git/state0/style-basic.tar
+++ b/tests/common/git/state0/style-basic.tar
Binary files differ
diff --git a/tests/common/git/state0/style.tar b/tests/common/git/state0/style.tar
index 7b48a9d..56e29f0 100644
--- a/tests/common/git/state0/style.tar
+++ b/tests/common/git/state0/style.tar
Binary files differ
diff --git a/tests/common/git/state1/libbaz.tar b/tests/common/git/state1/libbaz.tar
index 1b35ec4..7acf277 100644
--- a/tests/common/git/state1/libbaz.tar
+++ b/tests/common/git/state1/libbaz.tar
Binary files differ
diff --git a/tests/common/git/state1/libfoo.tar b/tests/common/git/state1/libfoo.tar
index ab694f7..532e974 100644
--- a/tests/common/git/state1/libfoo.tar
+++ b/tests/common/git/state1/libfoo.tar
Binary files differ
diff --git a/tests/common/git/state1/libfox.tar b/tests/common/git/state1/libfox.tar
index a6ef40e..ec49a86 100644
--- a/tests/common/git/state1/libfox.tar
+++ b/tests/common/git/state1/libfox.tar
Binary files differ
diff --git a/tests/common/git/state1/style-basic.tar b/tests/common/git/state1/style-basic.tar
index 7b7a6c5..1946606 100644
--- a/tests/common/git/state1/style-basic.tar
+++ b/tests/common/git/state1/style-basic.tar
Binary files differ
diff --git a/tests/common/git/state1/style.tar b/tests/common/git/state1/style.tar
index e6243f4..769b6d5 100644
--- a/tests/common/git/state1/style.tar
+++ b/tests/common/git/state1/style.tar
Binary files differ