diff options
author | Oliver Reiche <oliver.reiche@huawei.com> | 2023-12-12 11:10:26 +0100 |
---|---|---|
committer | Oliver Reiche <oliver.reiche@huawei.com> | 2023-12-12 11:56:35 +0100 |
commit | 540a789e05b2834e5e4453101e7dcae8c513103b (patch) | |
tree | a49ca8823c25b2caff786c7c90c0f8d5da42c2c4 /test | |
parent | 65d35006de65e540355833a56bcaa7659f6f1afd (diff) | |
download | justbuild-540a789e05b2834e5e4453101e7dcae8c513103b.tar.gz |
Tests: Verify copy overwrite of symlink with file
Diffstat (limited to 'test')
-rw-r--r-- | test/end-to-end/cli/install.sh | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/test/end-to-end/cli/install.sh b/test/end-to-end/cli/install.sh index 1e64b347..b3019e5b 100644 --- a/test/end-to-end/cli/install.sh +++ b/test/end-to-end/cli/install.sh @@ -71,7 +71,7 @@ cd "${OUTDIR}" grep World "${ID}" grep Original unrelated.txt -# Verify non-interference of install symlinks (overwrite existing file) +# Verify non-interference of install (overwrite existing file with symlink) cd "${SRCDIR}" "${TOOL}" install --local-build-root "${BUILDROOT}" -o "${OUTDIR}" symlink 2>&1 @@ -82,7 +82,7 @@ grep World hello.txt grep Original unrelated.txt [ "$(realpath --relative-to=$(pwd) hello.txt)" = "content.txt" ] -# Verify non-interference of install symlinks (overwrite existing symlink) +# Verify non-interference of install (overwrite existing symlink with symlink) rm -f ${OUTDIR}/hello.txt ln -s /noexistent ${OUTDIR}/hello.txt cd "${SRCDIR}" @@ -95,4 +95,17 @@ grep World hello.txt grep Original unrelated.txt [ "$(realpath --relative-to=$(pwd) hello.txt)" = "content.txt" ] +# Verify non-interference of install (overwrite existing symlink with file) +rm -f ${OUTDIR}/content.txt +ln -s /noexistent ${OUTDIR}/content.txt +cd "${SRCDIR}" +"${TOOL}" install --local-build-root "${BUILDROOT}" -o "${OUTDIR}" symlink 2>&1 + +echo +ls -al "${OUTDIR}" +cd "${OUTDIR}" +grep World hello.txt +grep Original unrelated.txt +[ "$(realpath --relative-to=$(pwd) hello.txt)" = "content.txt" ] + echo OK |