From 688a2b313e6d20044e0d32c7fa6309d183f2400f Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 4 Jun 2026 15:00:59 +0300 Subject: qi0 add just install workflow --- tests/cli.sh | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) (limited to 'tests/cli.sh') diff --git a/tests/cli.sh b/tests/cli.sh index 2d3f1cb..6cd363a 100755 --- a/tests/cli.sh +++ b/tests/cli.sh @@ -178,6 +178,33 @@ test_init_existing_config_fails_without_overwrite() { test::teardown } +test_just_install_and_deinstall_with_destdir() { + local stage_dir + + test::setup + stage_dir="$TEST_TMPDIR/stage" + + ( + cd "$TEST_REPO_ROOT" + DESTDIR="$stage_dir" PREFIX=/usr just install + ) + + test::assert_file_exists "$stage_dir/usr/bin/photoalbum" + test::assert_file_exists "$stage_dir/etc/default/photoalbum" + test::assert_file_exists \ + "$stage_dir/usr/share/photoalbum/templates/default/view.tmpl" + + ( + cd "$TEST_REPO_ROOT" + DESTDIR="$stage_dir" PREFIX=/usr just deinstall + ) + + test::assert_path_absent "$stage_dir/usr/bin/photoalbum" + test::assert_path_absent "$stage_dir/etc/default/photoalbum" + test::assert_path_absent "$stage_dir/usr/share/photoalbum" + test::teardown +} + test_clean() { local staging_dir @@ -2279,6 +2306,9 @@ main() { test::run_case \ '--init refuses existing config without overwrite' \ test_init_existing_config_fails_without_overwrite + test::run_case \ + 'just install and deinstall supports DESTDIR' \ + test_just_install_and_deinstall_with_destdir test::run_case '--clean succeeds' test_clean test::run_case '--clean --config succeeds' test_clean_with_config test::run_case '--clean --dist overrides config' \ -- cgit v1.2.3