|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +# Copyright (C) 2022-2024 the Eask authors. |
| 4 | + |
| 5 | +# This program is free software; you can redistribute it and/or modify |
| 6 | +# it under the terms of the GNU General Public License as published by |
| 7 | +# the Free Software Foundation; either version 3, or (at your option) |
| 8 | +# any later version. |
| 9 | + |
| 10 | +# This program is distributed in the hope that it will be useful, |
| 11 | +# but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 12 | +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 13 | +# GNU General Public License for more details. |
| 14 | + |
| 15 | +# You should have received a copy of the GNU General Public License |
| 16 | +# along with this program. If not, see <https://www.gnu.org/licenses/>. |
| 17 | + |
| 18 | +## Commentary: |
| 19 | +# |
| 20 | +# Tests "reinstall" command |
| 21 | + |
| 22 | +set -e |
| 23 | + |
| 24 | +source ./test/fixtures/home/scripts/testing.sh |
| 25 | +cd $(dirname "$0") |
| 26 | + |
| 27 | +# FIXME |
| 28 | +# unclear what should happen here |
| 29 | +# message seems to suggest that the package-file will be uninstalled |
| 30 | +# but this does not work, e.g. eask install -> eask uninstall does not undo |
| 31 | +# should_error eask reinstall |
| 32 | + |
| 33 | +# TODO this is some weird bug with install |
| 34 | +eask install || true # this fails, seems to want to print a message but throws |
| 35 | +eask install lint # already installed, but without the previous step it would fail |
| 36 | + |
| 37 | +# now it thinks this is unavailable |
| 38 | +should_run eask reinstall lint |
| 39 | +# FIXME no effect |
| 40 | +# should_error eask reinstall --strict lint |
| 41 | + |
| 42 | +# reinstall a package that isn't installed |
| 43 | +should_run eask reinstall s |
| 44 | + |
| 45 | +# reinstall a built-in package |
| 46 | +# FIXME huge stack trace |
| 47 | +should_error eask reinstall ert |
| 48 | + |
| 49 | +# seems like neither --strict or --allow-error has any effect |
0 commit comments